mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
Exception for function prevent_get_csrf
This commit is contained in:
parent
eae5c3418a
commit
834f939fbe
1 changed files with 21 additions and 16 deletions
|
@ -79,8 +79,13 @@ function prevent_post_csrf ($hard_check=false) {
|
|||
}
|
||||
}
|
||||
|
||||
function prevent_get_csrf ($hard_check=false) {
|
||||
function prevent_get_csrf () {
|
||||
global $login_url;
|
||||
if (file_exists('/usr/local/vesta/conf_web/dont_check_csrf')) return;
|
||||
if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
||||
if (isset($_GET[$login_url])) return;
|
||||
if ($_SERVER['REQUEST_URI']=="" || $_SERVER['REQUEST_URI']=="/" || $_SERVER['REQUEST_URI']=="/login/" || $_SERVER['REQUEST_URI']=="/list/web/") return;
|
||||
}
|
||||
if (isset($_SERVER['HTTP_HOST']) == false) return;
|
||||
if (isset($_SERVER['SERVER_PORT']) == false) return;
|
||||
if (isset($_SERVER['HTTP_REFERER']) == false) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue