#5098 Do not return a 500 error when the OpenID provider doesn't provide an email
Merged 3 years ago by pingou. Opened 3 years ago by pingou.

file modified
+9
@@ -49,6 +49,15 @@ 

      if not user:

          flask.session["_new_user"] = True

      else:

+         if not flask.g.fas_user.email:

+             flask.flash(

+                 "No email address was returned by your OpenID provider, this "

+                 "information is mandatory for pagure",

+                 "error",

+             )

+             logout()

+             return flask.redirect(return_url)

+ 

          user_email = pagure.lib.query.search_user(

              flask.g.session, email=flask.g.fas_user.email

          )

no initial comment

This is hotfixed on stg.pagure.io where we faced it

rebased onto b2a6635

3 years ago

Nice, tests are now passing without us doing anything... I guess the last run was just a hickup.

thanks for the review :)

Pull-Request has been merged by pingou

3 years ago
Metadata