修复在全名模式下,三级以上域名不能加白其子域名的bug

This commit is contained in:
gently 2020-02-11 11:51:47 +08:00
parent bbdf62447d
commit 64b55a7457
2 changed files with 4 additions and 14 deletions

View File

@ -216,12 +216,6 @@ class addressMaker{
if(array_key_exists($subdomain, $arr_whitelist)){ if(array_key_exists($subdomain, $arr_whitelist)){
continue; continue;
} }
if(1 === $arr_format['full_domain']){
$str_result .= str_replace('{DOMAIN}', $subdomain, $arr_format['format']) . "\n";
$line_count ++;
$arr_written[] = $subdomain;
continue;
}
$arr_tmp_domain = explode('.', $subdomain); $arr_tmp_domain = explode('.', $subdomain);
$tmp_domain_len = count($arr_tmp_domain); $tmp_domain_len = count($arr_tmp_domain);
@ -237,11 +231,9 @@ class addressMaker{
$arr_tmp = array_slice($arr_tmp_domain, -1 * $pos); $arr_tmp = array_slice($arr_tmp_domain, -1 * $pos);
$tmp = implode('.', $arr_tmp); $tmp = implode('.', $arr_tmp);
if(array_key_exists($tmp, $arr_whitelist)){ if(array_key_exists($tmp, $arr_whitelist)){
if($arr_whitelist[$tmp] === 1){ $matched_flag = $arr_whitelist[$tmp] === 1;
$matched_flag = true; if($matched_flag){
}else{ $arr_written[] = $subdomain;
$matched_flag = false;
$arr_written[] = $tmp;
} }
break; break;
}elseif(($tmp === $subdomain) || in_array($tmp, $arr_subdomains)){ }elseif(($tmp === $subdomain) || in_array($tmp, $arr_subdomains)){
@ -250,7 +242,7 @@ class addressMaker{
$line_count ++; $line_count ++;
$arr_written[] = $tmp; $arr_written[] = $tmp;
} }
$matched_flag = true; $matched_flag = 1 !== $arr_format['full_domain'];
break; break;
} }
} }

View File

@ -59,8 +59,6 @@ return array(
'lmlicenses.wip4.adobe.com' => 0, 'lmlicenses.wip4.adobe.com' => 0,
'na1r.services.adobe.com' => 0, 'na1r.services.adobe.com' => 0,
'licenses.adobe.com' => 1, 'licenses.adobe.com' => 1,
'lm.licenses.adobe.com' => 1,
'na2m-pr.licenses.adobe.com' => 1,
'alcohol-soft.com' => 1, 'alcohol-soft.com' => 1,
'licenses.ashampoo.com' => 0, 'licenses.ashampoo.com' => 0,
'bluesoleil.com' => 1, 'bluesoleil.com' => 1,