Merge pull request #2106 from keepassxreboot/fix/dont_clear_username

Do not clear the username field if the entry has no username set
This commit is contained in:
Sami Vänttinen 2024-02-02 17:52:52 +02:00 committed by GitHub
commit d713bf4565
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -256,7 +256,8 @@ kpxcFill.fillInCredentials = async function(combination, predefinedUsername, uui
}
// Fill username
if (combination.username && (!combination.username.value || combination.username.value !== usernameValue)) {
if (combination.username && usernameValue &&
(!combination.username.value || combination.username.value !== usernameValue)) {
if (!passOnly) {
kpxc.setValueWithChange(combination.username, usernameValue);
}