Commit 51161f86 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Security: do not hide exceptions in getUserEntry

If exception happens when contacting google server, just propagate it,
PAS will handle it.
parent 1b93df33
......@@ -275,8 +275,6 @@ class ERP5GoogleExtractionPlugin(ERP5ExternalOauth2ExtractionPlugin, BasePlugin)
).authorize(httplib2.Http())
service = apiclient.discovery.build("oauth2", "v1", http=http)
google_entry = service.userinfo().get().execute()
except Exception:
google_entry = None
finally:
socket.setdefaulttimeout(timeout)
user_entry = {}
......
  • PAS only catch a few exceptions, not socket.timeout, but anyway catching this exception or not does not make a difference I feel:

    • if exception is propagated, user sees "timeout" site error
    • if exception is catched, user will not be logged in for this request and surely some error will happen
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