stanley-king 3 年之前
父节点
当前提交
be5865c63a
共有 2 个文件被更改,包括 20 次插入20 次删除
  1. 10 10
      mchsrv/control/merchant.php
  2. 10 10
      mobile/control/merchant.php

+ 10 - 10
mchsrv/control/merchant.php

@@ -21,16 +21,16 @@ class merchantControl
             throw new Exception("机构已被关闭。");
             throw new Exception("机构已被关闭。");
         }
         }
 
 
-//        $ips = unserialize($mchinfo['ip_white_list']);
-//
-//        if(!empty($ips)) {
-//            $addr = $_SERVER['REMOTE_ADDR'];
-//            Log::record("request ip:{$addr}",Log::DEBUG);
-//
-//            if(!in_array($addr,$ips)) {
-//                throw new Exception("请求地址不在白名单中");
-//            }
-//        }
+        $ips = unserialize($mchinfo['ip_white_list']);
+
+        if(!empty($ips)) {
+            $addr = $_SERVER['REMOTE_ADDR'];
+            Log::record("request ip:{$addr}",Log::DEBUG);
+
+            if(!in_array($addr,$ips)) {
+                throw new Exception("请求地址不在白名单中");
+            }
+        }
 
 
         $this->mUseKey = intval($mchinfo['use_key']);
         $this->mUseKey = intval($mchinfo['use_key']);
         if($this->mUseKey && !$this->verify_md5($mchinfo['secure_key'])) {
         if($this->mUseKey && !$this->verify_md5($mchinfo['secure_key'])) {

+ 10 - 10
mobile/control/merchant.php

@@ -21,16 +21,16 @@ class merchantControl
             throw new Exception("机构已被关闭。");
             throw new Exception("机构已被关闭。");
         }
         }
 
 
-        $ips = unserialize($mchinfo['ip_white_list']);
-
-        if(!empty($ips)) {
-            $addr = $_SERVER['REMOTE_ADDR'];
-            Log::record("request ip:{$addr}",Log::DEBUG);
-
-            if(!in_array($addr,$ips)) {
-                throw new Exception("请求地址不在白名单中");
-            }
-        }
+//        $ips = unserialize($mchinfo['ip_white_list']);
+//
+//        if(!empty($ips)) {
+//            $addr = $_SERVER['REMOTE_ADDR'];
+//            Log::record("request ip:{$addr}",Log::DEBUG);
+//
+//            if(!in_array($addr,$ips)) {
+//                throw new Exception("请求地址不在白名单中");
+//            }
+//        }
 
 
         $this->mUseKey = intval($mchinfo['use_key']);
         $this->mUseKey = intval($mchinfo['use_key']);
         if($this->mUseKey && !$this->verify_md5($mchinfo['secure_key'])) {
         if($this->mUseKey && !$this->verify_md5($mchinfo['secure_key'])) {