-
-
Notifications
You must be signed in to change notification settings - Fork 110
Closed as not planned
Labels
bugSomething is not workingSomething is not working
Description
Here we validate detached signature for mail (not decrypted_mail):
Lines 484 to 489 in a89b632
| let mail = mail.as_ref().map(|mail| { | |
| let (content, signatures_detached) = validate_detached_signature(mail, &public_keyring) | |
| .unwrap_or((mail, Default::default())); | |
| signatures.extend(signatures_detached); | |
| content | |
| }); |
If the signature is valid, we put it into signatures set, but according to its documentation non-empty signatures set means that the message is encrypted and signed:
Lines 79 to 84 in a89b632
| /// Set of valid signature fingerprints if a message is an | |
| /// Autocrypt encrypted and signed message. | |
| /// | |
| /// If a message is not encrypted or the signature is not valid, | |
| /// this set is empty. | |
| pub signatures: HashSet<Fingerprint>, |
If the messages is just signed with a detached signature, but not encrypted, it should be treated as insecure message like we do for normal signatures.
Noticed this while re-reading the code that validates signatures, opened a related refactoring PR: #7119
Metadata
Metadata
Assignees
Labels
bugSomething is not workingSomething is not working