Attempt to fix gui login errors when uri is missing

This commit is contained in:
Bernd Schoolmann 2024-02-12 18:06:53 +01:00
parent a94d8f052b
commit 11ad8c4f48
No known key found for this signature in database
1 changed files with 10 additions and 0 deletions

View File

@ -129,6 +129,8 @@ func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, va
actionsLog.Warn("Could not decrypt login:" + err.Error()) actionsLog.Warn("Could not decrypt login:" + err.Error())
continue continue
} }
} else {
decryptedName = []byte{}
} }
if !login.Login.Username.IsNull() { if !login.Login.Username.IsNull() {
@ -137,6 +139,8 @@ func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, va
actionsLog.Warn("Could not decrypt login:" + err.Error()) actionsLog.Warn("Could not decrypt login:" + err.Error())
continue continue
} }
} else {
decryptedUsername = []byte{}
} }
if !login.Login.Password.IsNull() { if !login.Login.Password.IsNull() {
@ -145,6 +149,8 @@ func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, va
actionsLog.Warn("Could not decrypt login:" + err.Error()) actionsLog.Warn("Could not decrypt login:" + err.Error())
continue continue
} }
} else {
decryptedPassword = []byte{}
} }
if !login.Login.Totp.IsNull() { if !login.Login.Totp.IsNull() {
@ -153,6 +159,8 @@ func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, va
actionsLog.Warn("Could not decrypt login:" + err.Error()) actionsLog.Warn("Could not decrypt login:" + err.Error())
continue continue
} }
} else {
decryptedTotp = []byte{}
} }
if !login.Login.URI.IsNull() { if !login.Login.URI.IsNull() {
@ -161,6 +169,8 @@ func handleListLoginsRequest(request messages.IPCMessage, cfg *config.Config, va
actionsLog.Warn("Could not decrypt login:" + err.Error()) actionsLog.Warn("Could not decrypt login:" + err.Error())
continue continue
} }
} else {
decryptedURL = []byte{}
} }
decryptedLoginCiphers = append(decryptedLoginCiphers, messages.DecryptedLoginCipher{ decryptedLoginCiphers = append(decryptedLoginCiphers, messages.DecryptedLoginCipher{