Commit 08afd412 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Security: fix a NameError in ERP5ExternalOauth2ExtractionPlugin

Happens when user has a __ac_google_hash cookie but token cannot be
found in token storage.
In that case login wouldn't be possible anyway, but we should not
pollute the logs.
parent 241868ae
No related merge requests found
......@@ -142,6 +142,7 @@ class ERP5ExternalOauth2ExtractionPlugin:
security.declarePrivate('extractCredentials')
def extractCredentials(self, request):
""" Extract Oauth2 credentials from the request header. """
user_dict = {}
cookie_hash = request.get(self.cookie_name)
if cookie_hash is not None:
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment