maxmind国家判断失效跳过

This commit is contained in:
root
2026-06-20 11:49:29 +08:00
parent 24ff3f9657
commit acb0c09a00
7 changed files with 47 additions and 17 deletions
+6
View File
@@ -34,6 +34,12 @@ $tests['resolved_config'] = CountryAllowlist::formatForConfig('us,gb') === Count
$stage = file_get_contents($root . '/lib/Cloak/Pipeline/stages/check_country_geoip.inc.php');
$tests['stage_skips_when_disabled'] = strpos($stage, 'CountryAllowlist::isEnabled()') !== false;
$tests['stage_defers_unresolved_to_byapi'] = strpos($stage, '交由 byApi 兜底') !== false
&& strpos($stage, '无法识别访客国家') === false;
$tests['visitor_info_syncs_api_country_session'] = strpos(
file_get_contents($root . '/lib/Cloak/VisitorInfo.php'),
"\$_SESSION['gcu_country'] = \$this->v_country;"
) !== false;
$pipeline = file_get_contents($root . '/lib/Cloak/Pipeline/CheckPipeline.php');
$tests['pipeline_conditional_geo'] = strpos($pipeline, 'CountryAllowlist::isEnabled()') !== false;