From ebd28cd78361384d9c143964f82123088d9a16f9 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 12 May 2023 17:19:41 -0300 Subject: [PATCH] chore: Update fix-oidc-access-token-post.patch --- patch/fix-oidc-access-token-post.patch | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/patch/fix-oidc-access-token-post.patch b/patch/fix-oidc-access-token-post.patch index 4234fdf61..00271633e 100644 --- a/patch/fix-oidc-access-token-post.patch +++ b/patch/fix-oidc-access-token-post.patch @@ -11,12 +11,10 @@ diff -ur oidc_provider.orig/lib/utils/common.py oidc_provider/lib/utils/common.p --- oidc_provider.orig/lib/utils/oauth2.py 2020-05-22 15:09:21.009044320 +0200 +++ oidc_provider/lib/utils/oauth2.py 2020-06-05 17:05:23.271285858 +0200 -@@ -21,10 +21,14 @@ - """ +@@ -22,9 +22,13 @@ auth_header = request.META.get('HTTP_AUTHORIZATION', '') -- if re.compile('^[Bb]earer\s{1}.+$').match(auth_header): -+ if re.compile(r'^[Bb]earer\s{1}.+$').match(auth_header): + if re.compile(r'^[Bb]earer\s{1}.+$').match(auth_header): access_token = auth_header.split()[1] - else: + elif request.method == 'GET': @@ -27,13 +25,4 @@ diff -ur oidc_provider.orig/lib/utils/common.py oidc_provider/lib/utils/common.p + access_token = '' return access_token - -@@ -39,7 +43,7 @@ - """ - auth_header = request.META.get('HTTP_AUTHORIZATION', '') - -- if re.compile('^Basic\s{1}.+$').match(auth_header): -+ if re.compile(r'^Basic\s{1}.+$').match(auth_header): - b64_user_pass = auth_header.split()[1] - try: - user_pass = b64decode(b64_user_pass).decode('utf-8').split(':') +