补上admin_login与api/admin遗漏的captcha_guard require(此前调用cgWidgetHtml/cgEnforce但未引入库,线上报undefined function)

This commit is contained in:
ypsdf1
2026-10-01 14:03:58 +08:00
parent 17d53c40a0
commit ea5d476825
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -2,6 +2,8 @@
// ★ 紧急加固(2026-09-29):第二层 IP 白名单 —— 登录页本身也只对白名单 IP 开放 // ★ 紧急加固(2026-09-29):第二层 IP 白名单 —— 登录页本身也只对白名单 IP 开放
require_once __DIR__ . '/security.php'; require_once __DIR__ . '/security.php';
secGatePage(); secGatePage();
// ★ 人机验证(2026-10-02):cgWidgetHtml() 渲染挂件,未配密钥时自动放行
require_once __DIR__ . '/captcha_guard.php';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-CN"> <html lang="zh-CN">
+2
View File
@@ -32,6 +32,8 @@ if (!extension_loaded('sqlite3')) {
} }
require_once __DIR__ . '/../core.php'; require_once __DIR__ . '/../core.php';
// ★ 人机验证(2026-10-02):adminDoLogin 在密码比对前 cgEnforce(),未配密钥时自动放行
require_once __DIR__ . '/../captcha_guard.php';
if (!function_exists('error') || !function_exists('success') || !function_exists('getParam')) { if (!function_exists('error') || !function_exists('success') || !function_exists('getParam')) {
exit(json_encode(['success' => false, 'message' => 'core.php load failed'], JSON_UNESCAPED_UNICODE)); exit(json_encode(['success' => false, 'message' => 'core.php load failed'], JSON_UNESCAPED_UNICODE));