Skip to content

Commit

Permalink
Use more generic False-y check
Browse files Browse the repository at this point in the history
This will prevent redirect loops with the strict validation disabled

Co-authored-by: Giuseppe De Marco <[email protected]>
  • Loading branch information
tymees and Giuseppe De Marco authored Oct 2, 2023
1 parent 3b8d0d6 commit 9bfd3df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangosaml2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def post(self, request, attribute_mapping=None, create_unknown_user=None):
return HttpResponseRedirect(custom_redirect_url)

relay_state = validate_referral_url(request, relay_state)
if relay_state is None:
if not relay_state:
logger.debug(
"RelayState is not a valid URL, redirecting to fallback: %s",
relay_state
Expand Down

0 comments on commit 9bfd3df

Please sign in to comment.