Ask consent on SSO registration with default mxid (#10733)

Fixes #10732: consent flow skipped during SSO user registration if username is left at default

Signed-off-by: Andrew Ferrazzutti fair@miscworks.net
This commit is contained in:
AndrewFerr 2021-09-10 05:36:45 -04:00 committed by GitHub
parent 7f0565e029
commit 0c0da36a68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 23 deletions

View file

@ -63,8 +63,8 @@ class NewUserConsentResource(DirectServeHtmlResource):
self._sso_handler.render_error(request, "bad_session", e.msg, code=e.code)
return
# It should be impossible to get here without having first been through
# the pick-a-username step, which ensures chosen_localpart gets set.
# It should be impossible to get here without either the user or the mapping provider
# having chosen a username, which ensures chosen_localpart gets set.
if not session.chosen_localpart:
logger.warning("Session has no user name selected")
self._sso_handler.render_error(