mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Fix for an boring PHP Notice in vesta-php
This commit is contained in:
parent
6d36502623
commit
d625c9722a
1 changed files with 2 additions and 1 deletions
|
@ -63,7 +63,8 @@ function prevent_post_csrf ($hard_check=false) {
|
|||
if (isset($_SERVER['HTTP_ORIGIN']) == false) $_SERVER['HTTP_ORIGIN'] = '';
|
||||
}
|
||||
$_SERVER['HTTP_HOST'] = strtolower($_SERVER['HTTP_HOST']);
|
||||
$_SERVER['HTTP_ORIGIN'] = strtolower($_SERVER['HTTP_ORIGIN']);
|
||||
if (isset($_SERVER['HTTP_ORIGIN'])) $_SERVER['HTTP_ORIGIN'] = strtolower($_SERVER['HTTP_ORIGIN']);
|
||||
else $_SERVER['HTTP_ORIGIN']='';
|
||||
if ($hard_check == false) {
|
||||
if (substr($_SERVER['HTTP_ORIGIN'], 0, 8) != "file:///" && substr($_SERVER['HTTP_ORIGIN'], 0, 7) != "http://" && substr($_SERVER['HTTP_ORIGIN'], 0, 8) != "https://") return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue