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.
1 parent 06f6fff commit b7c19a8Copy full SHA for b7c19a8
web/reset/mail/index.php
@@ -5,6 +5,23 @@
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
+ // search for NAT IPs and allow them
16
+ if ($ip==$arr_key || $ip==$arr_val['NAT']) {
17
+ $ok=1;
18
+ break;
19
+ }
20
+}
21
+if ($ip == $_SERVER['SERVER_ADDR']) $ok=1;
22
+if ($ip == '127.0.0.1') $ok=1;
23
+if ($ok==0) exit;
24
+
25
//
26
// sourceforge.net/projects/postfixadmin/
27
// md5crypt
0 commit comments