Skip to content

Commit 9bfd3df

Browse files
tymeesGiuseppe De Marco
andauthored
Use more generic False-y check
This will prevent redirect loops with the strict validation disabled Co-authored-by: Giuseppe De Marco <[email protected]>
1 parent 3b8d0d6 commit 9bfd3df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

djangosaml2/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def post(self, request, attribute_mapping=None, create_unknown_user=None):
575575
return HttpResponseRedirect(custom_redirect_url)
576576

577577
relay_state = validate_referral_url(request, relay_state)
578-
if relay_state is None:
578+
if not relay_state:
579579
logger.debug(
580580
"RelayState is not a valid URL, redirecting to fallback: %s",
581581
relay_state

0 commit comments

Comments
 (0)