Improve filtermail checks for encrypted messages#320
Merged
Conversation
0dc991d to
f9cf2c8
Compare
hpk42
reviewed
Jun 11, 2024
|
|
||
| for line in payload.split("\r\n"): | ||
| if NONBASE64_REGEX.match(line): | ||
| return False |
Contributor
There was a problem hiding this comment.
this could be a multi-line regex match to avoid splitting and iterating the lines.
Contributor
Author
There was a problem hiding this comment.
Replaced with a single regex and fullmatch
hagenest
approved these changes
Jun 11, 2024
|
|
||
| ## untagged | ||
|
|
||
| - improve filtermail checks for encrypted messages and drop support for unencrypted MDNs |
Contributor
There was a problem hiding this comment.
Correct me, if I'm wrong, but this does affect read receipts on chatmail, right? Maybe we should make this clearer, before we're getting bug reports?
Can't really tell, if most of our users know what MDN means - I certanily didn't a few months ago.
Contributor
Author
There was a problem hiding this comment.
See second commit message, read receipts are already encrypted in 1.44 and in the new 1.46 release.
Ensure that first part only contains "Version: 1" and second part only contains base64 payload enclosed in "-----BEGIN PGP MESSAGE-----" and "-----END PGP MESSAGE-----".
Delta Chat does not send them since 1.43. 1.44 has been released for a while already and 1.46 is in the process of being released.
f9cf2c8 to
f71c899
Compare
hpk42
approved these changes
Jun 11, 2024
Contributor
hpk42
left a comment
There was a problem hiding this comment.
lgtm -- i assume the staging CI deploy tests fail for unrelated reasons.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ensure that first part only contains "Version: 1"
and second part only contains base64 payload
enclosed in "-----BEGIN PGP MESSAGE-----"
and "-----END PGP MESSAGE-----".
Second commit removes support for unencrypted MDNs.