Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25196b4

Browse files
committed
Patch for an Issue #1021
1 parent 84ba5f3 commit 25196b4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,9 @@ def _setHTTPAuthentication():
11881188
if not conf.authType and not conf.authCred and not conf.authPrivate:
11891189
return
11901190

1191+
if conf.authPrivate and not conf.authType:
1192+
conf.authType = AUTH_TYPE.PKI
1193+
11911194
elif conf.authType and not conf.authCred and not conf.authPrivate:
11921195
errMsg = "you specified the HTTP authentication type, but "
11931196
errMsg += "did not provide the credentials"
@@ -1198,7 +1201,7 @@ def _setHTTPAuthentication():
11981201
errMsg += "but did not provide the type"
11991202
raise SqlmapSyntaxException(errMsg)
12001203

1201-
elif conf.authType.lower() not in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST, AUTH_TYPE.NTLM, AUTH_TYPE.PKI):
1204+
elif (conf.authType or "").lower() not in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST, AUTH_TYPE.NTLM, AUTH_TYPE.PKI):
12021205
errMsg = "HTTP authentication type value must be "
12031206
errMsg += "Basic, Digest, NTLM or PKI"
12041207
raise SqlmapSyntaxException(errMsg)

0 commit comments

Comments
 (0)