We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 06f6fff + 14c8e56 commit 07453d7Copy full SHA for 07453d7
web/reset/mail/index.php
@@ -5,6 +5,22 @@
5
6
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
7
8
+// Checking IP of incoming connection, checking is it NAT address
9
+$ok=0;
10
+$ip=$_SERVER['REMOTE_ADDR'];
11
+exec (VESTA_CMD."v-list-sys-ips json", $output, $return_var);
12
+$output=implode('', $output);
13
+$arr=json_decode($output, true);
14
+foreach ($arr as $arr_key => $arr_val) {
15
+ if ($ip==$arr_key || $ip==$arr_val['NAT']) {
16
+ $ok=1;
17
+ break;
18
+ }
19
+}
20
+if ($ip == $_SERVER['SERVER_ADDR']) $ok=1;
21
+if ($ip == '127.0.0.1') $ok=1;
22
+if ($ok==0) exit;
23
+
24
//
25
// sourceforge.net/projects/postfixadmin/
26
// md5crypt
0 commit comments