Skip to content

Commit 3e7a59a

Browse files
authored
Avoid NO_AUTH_REQUIRED2 in secure_login.php
1 parent 334e54b commit 3e7a59a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

web/inc/secure_login.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?php
2-
require_once('/usr/local/vesta/web/inc/login_url.php');
3-
if (isset($_GET[$login_url])) {
4-
setcookie($login_url, '1', time() + 31536000, '/', $_SERVER['HTTP_HOST'], true);
5-
header ("Location: /login/");
6-
exit;
2+
if (!defined('NO_AUTH_REQUIRED2')) {
3+
if (file_exists('/usr/local/vesta/web/inc/login_url.php')) {
4+
require_once('/usr/local/vesta/web/inc/login_url.php');
5+
if (isset($_GET[$login_url])) {
6+
setcookie($login_url, '1', time() + 31536000, '/', $_SERVER['HTTP_HOST'], true);
7+
header ("Location: /login/");
8+
exit;
9+
}
10+
if (!isset($_COOKIE[$login_url])) exit;
711
}
8-
if (!isset($_COOKIE[$login_url])) exit;

0 commit comments

Comments
 (0)