xxxrrrdddd il y a 2 ans
Parent
commit
2be570c1e8
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      application/admin/lang/zh-cn/general/config.php
  2. 1 1
      application/common.php

+ 1 - 1
application/admin/lang/zh-cn/general/config.php

@@ -52,7 +52,7 @@ return [
     'Cdn url'                     => 'CDN地址',
     'Version'                     => '版本号',
     'Timezone'                    => '时区',
-    'Forbidden ip'                => '禁止IP',
+    'Forbidden ip'                => '允许访问IP',
     'Languages'                   => '语言',
     'Fixed page'                  => '后台固定页',
     'Category type'               => '分类类型',

+ 1 - 1
application/common.php

@@ -477,7 +477,7 @@ if (!function_exists('check_ip_allowed')) {
         $forbiddenipArr = config('site.forbiddenip');
         $forbiddenipArr = !$forbiddenipArr ? [] : $forbiddenipArr;
         $forbiddenipArr = is_array($forbiddenipArr) ? $forbiddenipArr : array_filter(explode("\n", str_replace("\r\n", "\n", $forbiddenipArr)));
-        if ($forbiddenipArr && \Symfony\Component\HttpFoundation\IpUtils::checkIp($ip, $forbiddenipArr)) {
+        if (/*$forbiddenipArr && */!\Symfony\Component\HttpFoundation\IpUtils::checkIp($ip, $forbiddenipArr)) {
             $response = Response::create('请求无权访问', 'html', 403);
             throw new HttpResponseException($response);
         }