Avoid password-manager prompts in settings
Render settings secrets as masked text inputs instead of browser password fields. Add a static regression test so settings password controls do not return during future refactors.
Alessandro committed
Jul 2, 2026 at 16:56 UTC
6580ae8becdbf2811395b421bacf77a327612509
4 files changed
+33
-3
tests/test_settings_developer_sections.py
+26
@@ -51,3 +51,29 @@ def test_timezone_settings_section_is_present():
51
assert "12-hour (AM/PM)" in locale
52
assert "24-hour" in locale
53
assert "$store.settings.settings.time_format" in locale
54
+
55
+
56
+def test_settings_secret_fields_use_masked_text_inputs():
57
+ auth_template = (
58
+ PROJECT_ROOT
59
+ / "webui"
60
+ / "components"
61
+ / "settings"
62
+ / "external"
63
+ / "auth.html"
64
+ ).read_text(encoding="utf-8")
65
+ dev_template = (
66
+ PROJECT_ROOT
67
+ / "webui"
68
+ / "components"
69
+ / "settings"
70
+ / "developer"
71
+ / "dev.html"
72
+ ).read_text(encoding="utf-8")
73
+ settings_css = (PROJECT_ROOT / "webui" / "css" / "settings.css").read_text(encoding="utf-8")
74
+
75
+ settings_templates = "\n".join([auth_template, dev_template])
76
+
77
+ assert 'type="password"' not in settings_templates
78
+ assert 'class="masked-text-input"' in settings_templates
79
+ assert "-webkit-text-security: disc" in settings_css
webui/components/settings/developer/dev.html
+1
-1
@@ -36,7 +36,7 @@
36
</div>
37
</div>
38
<div class="field-control">
39
- <input type="password" autocomplete="off" x-model="$store.settings.settings.rfc_password" />
39
+ <input type="text" class="masked-text-input" autocomplete="off" x-model="$store.settings.settings.rfc_password" />
40
</div>
41
</div>
42
webui/components/settings/external/auth.html
+2
-2
@@ -33,7 +33,7 @@
33
<div class="field-description">The password for browser access to this Agent Zero instance.</div>
34
</div>
35
<div class="field-control">
36
- <input type="password" autocomplete="off" x-model="settings.auth_password" />
36
+ <input type="text" class="masked-text-input" autocomplete="off" x-model="settings.auth_password" />
37
</div>
38
</div>
39
@@ -54,7 +54,7 @@
54
</div>
55
</div>
56
<div class="field-control">
57
- <input type="password" autocomplete="off" x-model="settings.root_password" />
57
+ <input type="text" class="masked-text-input" autocomplete="off" x-model="settings.root_password" />
58
</div>
59
</div>
60
</template>
webui/css/settings.css
+4
@@ -72,6 +72,10 @@ textarea:focus {
72
filter: brightness(1.2);
73
}
74
75
+.masked-text-input {
76
+ -webkit-text-security: disc;
77
+}
78
+
79
.light-mode input[type="text"]:focus,
80
.light-mode input[type="number"]:focus,
81
.light-mode input[type="password"]:focus,