Skip to content

Commit

Permalink
[BUGFIX] Check if any usable key matches on clone (#3027)
Browse files Browse the repository at this point in the history
This commit changes the check whether we have access to the cloned
repository from checking whether *all* of our usable keys are included
to whether *any* of our usable keys are included.

Signed-off-by: Willem Mulder <[email protected]>
  • Loading branch information
14mRh4X0r authored Jan 8, 2025
1 parent 7e4f62b commit b6140bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/action/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ func (s *Action) cloneCheckDecryptionKeys(ctx context.Context, mount string) err
}

idSet := set.New(ids...)
if idSet.IsSubset(recpSet) {
// Check whether any of our usable keys are in recpSet
if _, found := recpSet.Choose(idSet.Contains); found {
out.Noticef(ctx, "Found valid decryption keys. You can now decrypt your passwords.")

return nil
Expand Down

0 comments on commit b6140bc

Please sign in to comment.