deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
630 stars 80 forks source link

Date header cannot be taken from protected headers #5716

Closed link2xt closed 13 hours ago

link2xt commented 1 week ago

While making PR #5715 I discovered that Date header cannot be protected. If it is moved into protected part and removed from unprotected IMF header, mimeparser ignores it because it extracts the Date header before decrypting the message: https://github.com/deltachat/deltachat-core-rust/blob/d40ec88b9458ea425b6a1ac04549daa5cae32554/src/mimeparser.rs#L223-L229

This receiver side should be fixed and the fix should be released before we start protecting the Date header. Even if we decide that we don't want it (because of possibility of decryption failures and non-fully-downloaded message), receiver should support it.