mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
- use token header from $_SERVER; fixed errors with auth token headers occured on some software configurations
(cherry picked from commit 5b3dd0d0fc)
This commit is contained in:
parent
f23ca43eea
commit
d67571fcb3
1 changed files with 2 additions and 2 deletions
|
|
@ -131,8 +131,8 @@ function check_token()
|
|||
{
|
||||
$token = access_token();
|
||||
if ($token == '') return true;
|
||||
$headers = getallheaders();
|
||||
if (!isset($headers['MTT-Token']) || $headers['MTT-Token'] != $token) {
|
||||
if (!isset($_SERVER)) return true;
|
||||
if (!isset($_SERVER['HTTP_MTT_TOKEN']) || $_SERVER['HTTP_MTT_TOKEN'] != $token) {
|
||||
die("Access denied! Try to reload the page.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue