diff --git a/auth_saml/controllers/main.py b/auth_saml/controllers/main.py index fb635d3a72..6cdd118cd8 100644 --- a/auth_saml/controllers/main.py +++ b/auth_saml/controllers/main.py @@ -83,7 +83,7 @@ def _saml_autoredirect(self): autoredirect_providers = self.list_saml_providers(True) # do not redirect if asked too or if a SAML error has been found disable_autoredirect = ( - "disable_autoredirect" in request.params or "error" in request.params + "disable_autoredirect" in request.params or "saml_error" in request.params ) if autoredirect_providers and not disable_autoredirect: return werkzeug.utils.redirect( diff --git a/auth_saml/readme/newsfragments/+avoid_autoredirect_loop.bugfix b/auth_saml/readme/newsfragments/+avoid_autoredirect_loop.bugfix new file mode 100644 index 0000000000..76fade2faf --- /dev/null +++ b/auth_saml/readme/newsfragments/+avoid_autoredirect_loop.bugfix @@ -0,0 +1 @@ +Avoid redirecting when there is a SAML error.