diff options
author | Robert Griebl <[email protected]> | 2022-07-29 23:18:37 +0200 |
---|---|---|
committer | Robert Griebl <[email protected]> | 2023-08-04 12:59:01 +0000 |
commit | b3665620377a06f7b7a012e2ae7b69d222fae435 (patch) | |
tree | 8a012e3ffd952197401f79a396e55e3850fee5ce /store/authdecorators.py | |
parent | 7259d1a839a698e68bc4a7020a63d2aca79a5ec6 (diff) |
PLEASE NOTE: This project is not maintained anymore. It was ported to
a Qt 6 cmake setup and a more modern Django and Python version to at
least keep it usable for legacy projects.
For non-production use-cases, please switch to the new
appman-package-server available in the Qt Application Manager
starting with version 6.7.
Task-number: AUTOSUITE-1368
Change-Id: Idc4f2490a2a4399c03fce761250f4b5ac2612a45
Reviewed-by: Dominik Holland <[email protected]>
Diffstat (limited to 'store/authdecorators.py')
-rw-r--r-- | store/authdecorators.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/authdecorators.py b/store/authdecorators.py index 2a4119c..a4307ff 100644 --- a/store/authdecorators.py +++ b/store/authdecorators.py @@ -60,7 +60,7 @@ def view_or_basicauth(view, request, test_func, realm="", *args, **kwargs): # NOTE: We are only support basic authentication for now. # if auth[0].lower() == "basic": - uname, passwd = base64.b64decode(auth[1]).split(':') + uname, passwd = base64.b64decode(auth[1].encode('utf-8')).decode('utf-8').split(':') user = authenticate(username=uname, password=passwd) if user is not None: if user.is_active: @@ -114,7 +114,7 @@ def logged_in_or_basicauth(realm=""): def view_decorator(func): def wrapper(request, *args, **kwargs): return view_or_basicauth(func, request, - lambda u: u.is_authenticated(), + lambda u: u.is_authenticated, realm, *args, **kwargs) return wrapper |