mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-07 20:08:58 +00:00
fix: address issue #8287 with blank SAML's RelayState
This commit is contained in:
parent
f86d045c01
commit
61ff3db0f1
@ -271,7 +271,10 @@ class Saml2AuthCallbackView(View, PrepareRequestMixin):
|
||||
auth.login(self.request, user)
|
||||
|
||||
logger.debug(log_prompt.format('Redirect'))
|
||||
next_url = saml_instance.redirect_to(post_data.get('RelayState', '/'))
|
||||
redir = post_data.get('RelayState')
|
||||
if not redir or len(redir) == 0:
|
||||
redir = "/"
|
||||
next_url = saml_instance.redirect_to(redir)
|
||||
return HttpResponseRedirect(next_url)
|
||||
|
||||
@csrf_exempt
|
||||
|
Loading…
Reference in New Issue
Block a user