Function lacre.text.is_pgp_inline can return false positive #102
Labels
No Label
ANSIBLE
BUG
CODE
DEVELOPMENT
DOCUMENTATION
FEEDBACK
FIX
HOWTOs
IDEA
INFRA
ISSUE
MAILSERVER
TESTS
To-Be-Reviewed
WEB
WEBSITE
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Disroot/gpg-lacre#102
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If somebody was exchanging email about PGP encryption and included being and end markers in the body, it would be classified as encrypted and therefore would not be encrypted by Lacre.
We need to do a smarter check for inline PGP markers. Some ideas for additional verifications:
Hmmm.. yeah, maybe something like that:
1 -> Only one "BEGIN" marker exist and is on the first non-blank line
2 --> Only Base64 characters follow the "BEGIN" marker until the "END" marker (ex)
3 ---> Only one "END" marker exist and is on the last non-blank line
This should help in some situations when someone put an encrypted message(s) anywhere into plain text email.
But.. if someone put a plain text (of Base64 characters only) between (1) and (3) then, well.. but why someone would do that? ..quite unusual.
I mean there can be one additional "B" step between (1) and (2) for example like:
1 -> Only one "BEGIN" marker exist and is on the first non-blank line
B --> Second and third lines after the "BEGIN" marker have 64 characters per line (ex)
2 ---> Only Base64 characters follow the "BEGIN" marker until the "END" marker (ex)
3 ----> Only one "END" marker exist and is on the last non-blank line
Of course there can be a situations when someone put multiple encrypted messages into one email, but.. but I did'nt sleep last night, so maybe I'm completely lost here :P
Edit: yeah.. I forgot about the "Charset:", "Version:" and "Comment:" lines inserted by some programs, so: (ex) = Excluding lines starting with "Charset:", "Version:" and "Comment:"
I've added a test that verifies if this issue is fixed (!103).
This issue has been fixed on
post-test-fixes
branch, while working on #110.