Skip to content

Commit c739e5f

Browse files
authored
Avoid pre-auth if login_url.php is not created
1 parent 3e7a59a commit c739e5f

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

web/index.php

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?php
2-
//require_once('/usr/local/vesta/web/inc/secure_login.php');
3-
//session_start();
4-
//if (isset($_SESSION['user'])) {
5-
// header("Location: /list/user/");
6-
//} else {
7-
// header("Location: /login/");
8-
//}
92

10-
require_once('/usr/local/vesta/web/inc/login_url.php');
11-
if (isset($_GET[$login_url])) {
12-
require_once('/usr/local/vesta/web/inc/secure_login.php');
3+
if (!file_exists('/usr/local/vesta/web/inc/login_url.php')) {
4+
session_start();
5+
if (isset($_SESSION['user'])) {
6+
header("Location: /list/user/");
7+
} else {
8+
header("Location: /login/");
9+
}
10+
} else {
11+
require_once('/usr/local/vesta/web/inc/login_url.php');
12+
if (isset($_GET[$login_url])) {
13+
require_once('/usr/local/vesta/web/inc/secure_login.php');
14+
}
15+
header("Location: /webmail/");
1316
}
14-
15-
header("Location: /webmail/");

0 commit comments

Comments
 (0)