mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
Skip diagnostic CSRF warning if the user is not logged in
This commit is contained in:
parent
9a34341759
commit
df59e541c9
1 changed files with 5 additions and 1 deletions
|
|
@ -321,7 +321,11 @@ class Security
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
trigger_error('CSRF token missing in POST request: ' . (\Context::get('act') ?: '(no act)'), \E_USER_WARNING);
|
if (Session::getMemberSrl())
|
||||||
|
{
|
||||||
|
trigger_error('CSRF token missing in POST request: ' . (\Context::get('act') ?: '(no act)'), \E_USER_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
$referer = strval($referer ?: $_SERVER['HTTP_REFERER']);
|
$referer = strval($referer ?: $_SERVER['HTTP_REFERER']);
|
||||||
if ($referer !== '')
|
if ($referer !== '')
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue