Fix typos to make key decryption work #148
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #147
My previous pull request #146 introduced several typos in the variables that broke the decrpytion of the encrypted key for kde and gnome (which was just introduced in the PR). Additionally it raised an error that resulted in a non-helpful and wrong error message "Failed to decrypt Signal password" instead of the helpful error message that was displayed in version 3.2.0 (which explained getting the key in Gnome).
This PR fixes those issues.
It does not fix the very general exception handling in sigexport/data.py line 28 which catches all Exceptions with the same unhelpful error message which in turn is necessary due to the general "raise" in sigexport/crypto.py line 82 and line 107. (Line numbers in new code.) This should (!) not be a user-facing issue anymore since non of those "raise" instructions should be run after this PR but in case of other Exceptions in decrypt() (sigexport/crypto.py) there is no distinction.
Tested with setup of NixOS/nixpkgs#353086 on KDE. Not tested on Gnome nor MacOS (nor Windows).