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

Skip to content

Commit f11e15a

Browse files
committed
Minor update
1 parent a3defc1 commit f11e15a

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

lib/core/option.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,17 +1123,18 @@ def _setHTTPAuthentication():
11231123
errMsg += "but did not provide the type"
11241124
raise SqlmapSyntaxException(errMsg)
11251125

1126+
elif conf.authType.lower() not in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST, AUTH_TYPE.NTLM, AUTH_TYPE.PKI):
1127+
errMsg = "HTTP authentication type value must be "
1128+
errMsg += "Basic, Digest, NTLM or PKI"
1129+
raise SqlmapSyntaxException(errMsg)
1130+
11261131
if not conf.authPrivate:
11271132
debugMsg = "setting the HTTP authentication type and credentials"
11281133
logger.debug(debugMsg)
11291134

11301135
aTypeLower = conf.authType.lower()
11311136

1132-
if aTypeLower not in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST, AUTH_TYPE.NTLM, AUTH_TYPE.PKI):
1133-
errMsg = "HTTP authentication type value must be "
1134-
errMsg += "Basic, Digest, NTLM or PKI"
1135-
raise SqlmapSyntaxException(errMsg)
1136-
elif aTypeLower in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST):
1137+
if aTypeLower in (AUTH_TYPE.BASIC, AUTH_TYPE.DIGEST):
11371138
regExp = "^(.*?):(.*?)$"
11381139
errMsg = "HTTP %s authentication credentials " % aTypeLower
11391140
errMsg += "value must be in format 'username:password'"

0 commit comments

Comments
 (0)