Some code cosmetics

This commit is contained in:
Ozzie Isaacs
2021-03-14 13:28:52 +01:00
parent e4e27662f5
commit 725fc658f8
21 changed files with 455 additions and 405 deletions

View File

@@ -72,7 +72,7 @@ def load_user_from_request(request):
def load_user_from_auth_header(header_val):
if header_val.startswith('Basic '):
header_val = header_val.replace('Basic ', '', 1)
basic_username = basic_password = ''
basic_username = basic_password = '' # nosec
try:
header_val = base64.b64decode(header_val).decode('utf-8')
basic_username = header_val.split(':')[0]