mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
merge from 1.5.3.2 (r12460 ~ r12482)
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@12491 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
a1cd4df78e
2 changed files with 33 additions and 0 deletions
|
|
@ -1131,6 +1131,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
function checkCSRF()
|
||||
{
|
||||
if($_SERVER['REQUEST_METHOD'] != 'POST')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$defaultUrl = Context::getDefaultUrl();
|
||||
$referer = parse_url($_SERVER["HTTP_REFERER"]);
|
||||
|
||||
if(!strstr($defaultUrl, $referer['host']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print raw html header
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue