Skip to content

Commit 8e29325

Browse files
authored
Merge branch 'master' into master
2 parents 07453d7 + fb2cdf6 commit 8e29325

File tree

10 files changed

+36
-13
lines changed

10 files changed

+36
-13
lines changed

bin/v-restart-proxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if [ -z "$PROXY_SYSTEM" ] || [ "$PROXY_SYSTEM" = 'remote' ]; then
5050
fi
5151

5252
# Restart system
53-
service $PROXY_SYSTEM restart >/dev/null 2>&1
53+
service $PROXY_SYSTEM reload >/dev/null 2>&1
5454
if [ $? -ne 0 ]; then
5555
send_email_report
5656
check_result $E_RESTART "$PROXY_SYSTEM restart failed"

web/api/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
define('VESTA_CMD', '/usr/bin/sudo /usr/local/vesta/bin/');
3-
3+
exit;
44
if (isset($_POST['user']) || isset($_POST['hash'])) {
55

66
// Authentication

web/inc/main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
2+
require_once('/usr/local/vesta/web/inc/secure_login.php');
33
session_start();
44

55
define('VESTA_CMD', '/usr/bin/sudo /usr/local/vesta/bin/');

web/inc/secure_login.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
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;
11+
}
12+
}

web/index.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
<?php
2-
session_start();
3-
if (isset($_SESSION['user'])) {
4-
header("Location: /list/user/");
2+
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+
}
510
} else {
6-
header("Location: /login/");
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/");
716
}

web/login/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
$_SESSION['look_alert'] = 'yes';
2626
}
2727
}
28-
header("Location: /");
28+
header("Location: /list/user/");
2929
exit;
3030
}
3131

@@ -109,7 +109,7 @@
109109
unset($_SESSION['request_uri']);
110110
exit;
111111
} else {
112-
header("Location: /");
112+
header("Location: /list/user/");
113113
exit;
114114
}
115115
}

web/logout/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
session_destroy();
99
}
1010

11-
header("Location: /");
11+
header("Location: /login/");
1212
exit;
1313
?>

web/reset/mail/index.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?php
22
// Init
33
define('NO_AUTH_REQUIRED',true);
4+
define('NO_AUTH_REQUIRED2',true);
45
error_reporting(NULL);
56

67
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
78

89
// Checking IP of incoming connection, checking is it NAT address
10+
//echo '<pre>'; print_r($_SERVER); exit;
911
$ok=0;
1012
$ip=$_SERVER['REMOTE_ADDR'];
1113
exec (VESTA_CMD."v-list-sys-ips json", $output, $return_var);
@@ -152,7 +154,7 @@ function to64 ($v, $n)
152154
fclose($fp);
153155
exec (VESTA_CMD."v-change-mail-account-password '".$v_user."' ".$v_domain." ".$v_account." ".$v_new_password, $output, $return_var);
154156
if ($return_var == 0) {
155-
echo "ok";
157+
echo "==ok==";
156158
exit;
157159
}
158160
}

web/templates/admin/panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<div class="l-header">
1010
<div class="l-center">
11-
<a href="/" class="l-logo"></a>
11+
<a href="/list/user/" class="l-logo"></a>
1212
<!-- /.l-logo -->
1313
<div class="l-menu clearfix noselect">
1414
<div class="l-menu__item <?php if($TAB == 'PACKAGE' ) echo 'l-menu__item--active' ?>"><a href="/list/package/"><?=__('Packages')?></a></div>

web/templates/user/panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</a>
88
<div class="l-header">
99
<div class="l-center">
10-
<a href="/" class="l-logo"></a>
10+
<a href="/list/user/" class="l-logo"></a>
1111
<!-- /.l-logo -->
1212
<div class="l-menu clearfix">
1313
<div class="l-menu__item <?php if($TAB == 'STATS' ) echo 'l-menu__item--active' ?>"><a href="/list/stats/"><?=__('Statistics')?></a></div>

0 commit comments

Comments
 (0)