MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / parse_auth

Function parse_auth

thirdparty/bottle/bottle.py:3373–3381  ·  view source on GitHub ↗

Parse rfc2617 HTTP authentication header string (basic) and return (user,pass) tuple or None

(header)

Source from the content-addressed store, hash-verified

3371
3372
3373def parse_auth(header):
3374 """ Parse rfc2617 HTTP authentication header string (basic) and return (user,pass) tuple or None"""
3375 try:
3376 method, data = header.split(None, 1)
3377 if method.lower() == 'basic':
3378 user, pwd = touni(base64.b64decode(tob(data))).split(':', 1)
3379 return user, pwd
3380 except (KeyError, ValueError):
3381 return None
3382
3383
3384def parse_range_header(header, maxlen=0):

Callers 1

authMethod · 0.85

Calls 2

touniFunction · 0.85
tobFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…