作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !2202
@@ -133,7 +133,7 @@ class NoticeController extends BaseController @@ -133,7 +133,7 @@ class NoticeController extends BaseController
133 $origin_domain = $origin_array['host'] ?? ''; 133 $origin_domain = $origin_array['host'] ?? '';
134 } 134 }
135 if (empty($origin_domain)) { 135 if (empty($origin_domain)) {
136 - return $this->error('origin_domain参数不能为空'); 136 + return $this->error('origin_domain参数填写有误');
137 } 137 }
138 138
139 if(strpos($target_domain,'http') !== false){ 139 if(strpos($target_domain,'http') !== false){
@@ -141,7 +141,7 @@ class NoticeController extends BaseController @@ -141,7 +141,7 @@ class NoticeController extends BaseController
141 $target_domain = $target_array['host'] ?? ''; 141 $target_domain = $target_array['host'] ?? '';
142 } 142 }
143 if (empty($target_domain)) { 143 if (empty($target_domain)) {
144 - return $this->error('target_domain参数不能为空'); 144 + return $this->error('target_domain参数填写有误');
145 } 145 }
146 146
147 147
@@ -150,7 +150,14 @@ class NoticeController extends BaseController @@ -150,7 +150,14 @@ class NoticeController extends BaseController
150 } 150 }
151 151
152 if($other_domain){ 152 if($other_domain){
153 - foreach ($other_domain as $ov) { 153 + foreach ($other_domain as &$ov) {
  154 + if(strpos($ov,'http') !== false){
  155 + $ov_array = parse_url($ov);
  156 + $ov = $ov_array['host'] ?? '';
  157 + }
  158 + if(empty($ov)){
  159 + return $this->error('other_domain参数填写有误');
  160 + }
154 if (!check_domain_record($ov, ['domain'=>'','ip'=>DomainInfo::SERVER_IP_301])) { 161 if (!check_domain_record($ov, ['domain'=>'','ip'=>DomainInfo::SERVER_IP_301])) {
155 return $this->error($ov . ' 未解析至 ' . DomainInfo::SERVER_IP_301); 162 return $this->error($ov . ' 未解析至 ' . DomainInfo::SERVER_IP_301);
156 } 163 }