Skip to content

Commit 716ae2a

Browse files
committed
Make sure that the user enters a username for cert auth
1 parent 36ca3a0 commit 716ae2a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

nxc/connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,9 @@ def login(self):
559559

560560
if self.args.pfx_cert or self.args.pfx_base64 or self.args.cert_pem:
561561
self.logger.debug("Trying to authenticate using Certificate pfx")
562+
if not self.args.username:
563+
self.logger.fail("You must specify a username when using certificate authentication")
564+
return False
562565
with sem:
563566
# Static DH params because the ones generated by cryptography are considered unsafe by AD for some weird reason
564567
dhparams = {

0 commit comments

Comments
 (0)