Skip to content

Commit 3358cd7

Browse files
authored
Merge pull request #43 from djpugh/fix/is-valid-redirect
2 parents 10d7b0e + cdd12ab commit 3358cd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/fastapi_aad_auth/_base/validators/session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def set_post_auth_redirect(self, request, redirect='/'):
4848

4949
def is_valid_redirect(self, redirect):
5050
"""Check if the redirect is not to endpoints that we don't want to redirect to."""
51+
if redirect is None:
52+
return False
5153
return not any(map(partial(fnmatch.fnmatch, redirect), self._ignore_redirect_routes))
5254

5355
@staticmethod

0 commit comments

Comments
 (0)