Skip to content

Commit

Permalink
handle incorrect passphrase with additional debug info
Browse files Browse the repository at this point in the history
- Ensured the passphrase argument is correctly passed to the PassphraseWrong exception.
  • Loading branch information
alighazi288 committed Dec 26, 2024
1 parent ecf8a1c commit 0a5c57d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/borg/crypto/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def detect(cls, repository, manifest_data):
raise PasswordRetriesExceeded
else:
if not key.load(target, passphrase):
raise PassphraseWrong
raise PassphraseWrong(passphrase)

Check warning on line 378 in src/borg/crypto/key.py

View check run for this annotation

Codecov / codecov/patch

src/borg/crypto/key.py#L378

Added line #L378 was not covered by tests
key.init_ciphers(manifest_data)
key._passphrase = passphrase
return key
Expand Down

0 comments on commit 0a5c57d

Please sign in to comment.