mirror of
https://github.com/quexten/goldwarden.git
synced 2024-12-25 04:14:02 +03:00
Fix cipher filter
This commit is contained in:
parent
22072a7a05
commit
917f875a42
@ -305,7 +305,11 @@ func (vault *Vault) GetLoginByFilter(uuid string, orgId string, name string, use
|
|||||||
log.Warn().Err(err).Msg("Failed to get key for cipher " + cipher.ID.String())
|
log.Warn().Err(err).Msg("Failed to get key for cipher " + cipher.ID.String())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if name != "" && !cipher.Name.IsNull() {
|
if name != "" {
|
||||||
|
if cipher.Name.IsNull() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
decryptedName, err := crypto.DecryptWith(cipher.Name, key)
|
decryptedName, err := crypto.DecryptWith(cipher.Name, key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn().Err(err).Msg("Failed to decrypt name for cipher " + cipher.ID.String())
|
log.Warn().Err(err).Msg("Failed to decrypt name for cipher " + cipher.ID.String())
|
||||||
@ -316,7 +320,11 @@ func (vault *Vault) GetLoginByFilter(uuid string, orgId string, name string, use
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if username != "" && !cipher.Login.Username.IsNull() {
|
if username != "" {
|
||||||
|
if cipher.Login.Username.IsNull() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
decryptedUsername, err := crypto.DecryptWith(cipher.Login.Username, key)
|
decryptedUsername, err := crypto.DecryptWith(cipher.Login.Username, key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn().Err(err).Msg("Failed to decrypt username for cipher " + cipher.ID.String())
|
log.Warn().Err(err).Msg("Failed to decrypt username for cipher " + cipher.ID.String())
|
||||||
|
Loading…
Reference in New Issue
Block a user