From 1df60e5fd5c016031c41060f964eabd088cf7010 Mon Sep 17 00:00:00 2001 From: yml2213 Date: Mon, 5 Oct 2026 16:41:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(rock-ui):=20=E4=BF=AE=E5=A4=8DRock=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E5=87=AD=E6=8D=AE=E9=85=8D=E7=BD=AE=E9=A1=B9=E8=A2=AB?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E8=AF=AF=E8=AF=86=E5=88=AB=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E5=AF=86=E7=A0=81=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 根因防御(账密陷阱 Honeypot):在配置表单头部注入隐藏的 dummy username/password 输入框,阻断 Chrome/Edge 密码管理器将 BaseURL 和 BearerToken 误判为网站登录凭据; 2. 属性隔离:为 Base URL 和 Bearer Token 分别显式指定独有 name、id 以及 autoComplete 属性(off / new-password); 3. 样式重置:在全局 CSS 中添加 autofill 伪类样式重置,清除浏览器默认侵入的淡蓝/黄色背景色。 --- frontend/src/index.css | 10 ++++++++++ frontend/src/pages/PlatformRock.tsx | 18 ++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/frontend/src/index.css b/frontend/src/index.css index 853ba2f..182b3e4 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1092,3 +1092,13 @@ a:hover { font-size: 12px; font-weight: 700; } + +/* 消除浏览器自动填充默认淡蓝色/黄色背景侵入 */ +input:-webkit-autofill, +input:-webkit-autofill:hover, +input:-webkit-autofill:focus, +input:-webkit-autofill:active { + -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important; + -webkit-text-fill-color: #0f172a !important; + transition: background-color 5000s ease-in-out 0s; +} diff --git a/frontend/src/pages/PlatformRock.tsx b/frontend/src/pages/PlatformRock.tsx index 3799823..6f6d96b 100644 --- a/frontend/src/pages/PlatformRock.tsx +++ b/frontend/src/pages/PlatformRock.tsx @@ -587,7 +587,13 @@ export default function PlatformRock() { {/* 策略表单 */} -
+ + {/* 阻断浏览器对凭据配置项的强制账密自动填充 (Honeypot) */} + +
- +