Merge pull request #1602 from keepassxreboot/fix/check_maxlength

Check that maxLength is above zero
This commit is contained in:
Sami Vänttinen 2022-04-13 07:12:55 +03:00 committed by GitHub
commit d0298865c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -254,7 +254,9 @@ 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) {
if (combination.password.maxLength
&& combination.password.maxLength > 0
&& selectedCredentials.password.length > combination.password.maxLength) {
kpxcUI.createNotification('error', tr('errorMessagePaswordLengthExceeded'));
}