mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Perform CSRF check for getLoginStatus separately
This commit is contained in:
parent
ed131897c5
commit
ed649fb58c
2 changed files with 5 additions and 2 deletions
|
|
@ -183,7 +183,10 @@ class memberModel extends member
|
|||
$origin = strval(($_SERVER['HTTP_ORIGIN'] ?? '') ?: ($_SERVER['HTTP_REFERER'] ?? ''));
|
||||
if ($origin !== '' && $origin !== 'null' && !Rhymix\Framework\URL::isInternalURL($origin))
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\SecurityViolation();
|
||||
$this->setError(-1);
|
||||
$this->setMessage('msg_security_violation');
|
||||
$this->add('errorDetail', 'ERR_CSRF_INVALID_ORIGIN');
|
||||
return;
|
||||
}
|
||||
|
||||
// Add CORS restriction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue