[SECURITY] Enforce session validation on oauth authorize endpoint

This commit is contained in:
Raphael Michel
2023-03-06 14:58:24 +01:00
parent 3077292d15
commit cbfac15e23
5 changed files with 169 additions and 5 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ class PermissionMiddleware:
url = resolve(request.path_info)
url_name = url.url_name
if not request.path.startswith(get_script_prefix() + 'control'):
if not request.path.startswith(get_script_prefix() + 'control') and not (url.namespace.startswith("api-") and url_name == "authorize"):
# This middleware should only touch the /control subpath
return self.get_response(request)