Repository navigation
Commit 77e3467
committed
fix: handle invalid or wrong e2e key with a clear error message
KeyFactory.new() returns None for an unrecognised key file, and the
library raises AttributeError when decrypt() is called with a None key.
Validate the key object before decrypting and wrap db.decrypt() in a
try/except so any decryption failure (wrong key, corrupt backup) exits
with a clear message instead of a raw traceback.1 parent 32cd0ec commit 77e3467
1 file changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1058 | 1058 | | |
1059 | 1059 | | |
1060 | 1060 | | |
1061 | | - | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1062 | 1075 | | |
1063 | 1076 | | |
1064 | 1077 | | |
| |||
0 commit comments