From f8b5fc87ec83427c40c4c6ffb3ce8c6880c31a47 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Tue, 12 Apr 2022 20:45:59 +0300 Subject: [PATCH] Check that maxLength is above zero --- keepassxc-browser/content/fill.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keepassxc-browser/content/fill.js b/keepassxc-browser/content/fill.js index b6a5548..2ab54e5 100644 --- a/keepassxc-browser/content/fill.js +++ b/keepassxc-browser/content/fill.js @@ -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')); }