mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Add a notification when filled password length exceeds the fields maxLength
This commit is contained in:
parent
adeb6add9a
commit
2a763cc6c3
2 changed files with 9 additions and 0 deletions
|
|
@ -103,6 +103,10 @@
|
|||
"message": "No logins found.",
|
||||
"description": "No logins found."
|
||||
},
|
||||
"errorMessagePaswordLengthExceeded": {
|
||||
"message": "Filled password is longer than field's allowed max length.",
|
||||
"description": "Error notification text shown when filled password is longer than defined maxLength of the input field."
|
||||
},
|
||||
"errorNotConnected": {
|
||||
"message": "Not connected to KeePassXC.",
|
||||
"description": "Error notification shown when not connected to KeePassXC"
|
||||
|
|
|
|||
|
|
@ -253,6 +253,11 @@ kpxcFill.fillInCredentials = async function(combination, predefinedUsername, uui
|
|||
|
||||
// Fill password
|
||||
if (combination.password) {
|
||||
// Show a notification if password length exceeds the length defined in input
|
||||
if (combination.password.maxLength && selectedCredentials.password.length > combination.password.maxLength) {
|
||||
kpxcUI.createNotification('error', tr('errorMessagePaswordLengthExceeded'));
|
||||
}
|
||||
|
||||
kpxc.setValueWithChange(combination.password, selectedCredentials.password);
|
||||
await kpxc.setPasswordFilled(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue