mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix #942 SSO error when CSRF token checking is enabled
This commit is contained in:
parent
039034c1be
commit
255352df62
1 changed files with 2 additions and 2 deletions
|
|
@ -325,7 +325,7 @@ class Session
|
|||
\Context::displayErrorPage('SSO Error', 'Invalid SSO Request', 400);
|
||||
exit;
|
||||
}
|
||||
if (!URL::isInternalUrl($sso_request) || !Security::checkCSRF())
|
||||
if (!URL::isInternalUrl($sso_request) || !URL::isInternalURL($_SERVER['HTTP_REFERER']))
|
||||
{
|
||||
\Context::displayErrorPage('SSO Error', 'Invalid SSO Request', 400);
|
||||
exit;
|
||||
|
|
@ -353,7 +353,7 @@ class Session
|
|||
}
|
||||
|
||||
// Check that the response was given by the default site (to prevent session fixation CSRF).
|
||||
if(isset($_SERVER['HTTP_REFERER']) && strpos(URL::decodeIdna($_SERVER['HTTP_REFERER']), $default_url) !== 0)
|
||||
if(isset($_SERVER['HTTP_REFERER']) && !URL::isInternalURL($_SERVER['HTTP_REFERER']))
|
||||
{
|
||||
\Context::displayErrorPage('SSO Error', 'Invalid SSO Response', 400);
|
||||
exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue