File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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'"
You can’t perform that action at this time.
0 commit comments