fix(rock-ui): 修复Rock平台凭据配置项被浏览器误识别触发密码自动填充的问题
1. 根因防御(账密陷阱 Honeypot):在配置表单头部注入隐藏的 dummy username/password 输入框,阻断 Chrome/Edge 密码管理器将 BaseURL 和 BearerToken 误判为网站登录凭据; 2. 属性隔离:为 Base URL 和 Bearer Token 分别显式指定独有 name、id 以及 autoComplete 属性(off / new-password); 3. 样式重置:在全局 CSS 中添加 autofill 伪类样式重置,清除浏览器默认侵入的淡蓝/黄色背景色。
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user