Skip to content

Commit b2f2caf

Browse files
authored
equalize with master
1 parent 4fa549c commit b2f2caf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

web/reset/mail/index.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<?php
22
// Init
33
define('NO_AUTH_REQUIRED',true);
4-
define('NO_AUTH_REQUIRED2',true);
54
error_reporting(NULL);
65

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

98
// Checking IP of incoming connection, checking is it NAT address
10-
//echo '<pre>'; print_r($_SERVER); exit;
119
$ok=0;
1210
$ip=$_SERVER['REMOTE_ADDR'];
1311
exec (VESTA_CMD."v-list-sys-ips json", $output, $return_var);
1412
$output=implode('', $output);
1513
$arr=json_decode($output, true);
1614
foreach ($arr as $arr_key => $arr_val) {
15+
// search for NAT IPs and allow them
1716
if ($ip==$arr_key || $ip==$arr_val['NAT']) {
1817
$ok=1;
1918
break;
@@ -22,7 +21,6 @@
2221
if ($ip == $_SERVER['SERVER_ADDR']) $ok=1;
2322
if ($ip == '127.0.0.1') $ok=1;
2423
if ($ok==0) exit;
25-
if (isset($_SERVER['HTTP_X_REAL_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR'])) exit;
2624

2725
//
2826
// sourceforge.net/projects/postfixadmin/

0 commit comments

Comments
 (0)