diff options
author | Jo-Philipp Wich <jo@mein.io> | 2023-06-07 23:40:04 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2023-06-07 23:40:04 +0200 |
commit | 23a246e4b4d0a0959d16a1add3868361b78f3021 (patch) | |
tree | 007539a65fba950f5d0927cbfbb0a205435a1361 /modules/luci-base/htdocs/luci-static | |
parent | a4a4273ca4297c19d143541155696e15291852d3 (diff) |
luci-base: ui.js: set `autocomplete="new-password"` for password fields
Attempt to prevent Firefox from randomly filling nonesense into arbitrary
password fields such as the WireGuard private key field by setting the
`autocomplete="new-password"` attribute on any password type fields.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/ui.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 9ecadb0cf8..2e697aa190 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -374,6 +374,7 @@ var UITextfield = UIElement.extend(/** @lends LuCI.ui.Textfield.prototype */ { 'disabled': this.options.disabled ? '' : null, 'maxlength': this.options.maxlength, 'placeholder': this.options.placeholder, + 'autocomplete': this.options.password ? 'new-password' : null, 'value': this.value, }); |