mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-21 15:41:54 +00:00
Fix for --http2 silently ignoring HTTP authentication (Basic sent preemptively, others rejected)
This commit is contained in:
parent
cdb787faea
commit
04f0987e81
3 changed files with 10 additions and 1 deletions
|
|
@ -736,6 +736,10 @@ class Connect(object):
|
|||
from lib.request.http2 import open_url as http2OpenUrl
|
||||
from lib.request.http2 import proxy_tuple
|
||||
|
||||
# Note: (preemptive) Basic authentication, as urllib's handlers are bypassed
|
||||
if (conf.authType or "").lower() == AUTH_TYPE.BASIC and conf.authUsername is not None and HTTP_HEADER.AUTHORIZATION not in headers:
|
||||
headers[HTTP_HEADER.AUTHORIZATION] = "Basic %s" % encodeBase64("%s:%s" % (conf.authUsername, conf.authPassword or ""), binary=False)
|
||||
|
||||
try:
|
||||
h2proxy = proxy_tuple(conf.proxy, conf.proxyCred)
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue