Check that maxLength is above zero

This commit is contained in:
varjolintu 2022-04-12 20:45:59 +03:00
parent 7b9d203b85
commit f8b5fc87ec

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'));
}