mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 01:32:59 +02:00
- fix cat_modify
* missing token in url * double icon display - simplified func check_pwg_token git-svn-id: http://piwigo.org/svn/trunk@5335 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1453,21 +1453,15 @@ function get_icon($date, $is_child_date = false)
|
||||
*/
|
||||
function check_pwg_token()
|
||||
{
|
||||
$valid_token = get_pwg_token();
|
||||
$given_token = null;
|
||||
|
||||
if (!empty($_POST['pwg_token']))
|
||||
if (!empty($_REQUEST['pwg_token']))
|
||||
{
|
||||
$given_token = $_POST['pwg_token'];
|
||||
}
|
||||
elseif (!empty($_GET['pwg_token']))
|
||||
{
|
||||
$given_token = $_GET['pwg_token'];
|
||||
}
|
||||
if ($given_token != $valid_token)
|
||||
{
|
||||
access_denied();
|
||||
if (get_pwg_token() != $_REQUEST['pwg_token'])
|
||||
{
|
||||
access_denied();
|
||||
}
|
||||
}
|
||||
else
|
||||
bad_request('missing token');
|
||||
}
|
||||
|
||||
function get_pwg_token()
|
||||
|
||||
Reference in New Issue
Block a user