-
-
Notifications
You must be signed in to change notification settings - Fork 105
test: Add regression test for verification-gossiping crash #7033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/receive_imf/receive_imf_tests.rs
Outdated
@@ -3050,6 +3051,46 @@ async fn test_auto_accept_protected_group_for_bots() -> Result<()> { | |||
Ok(()) | |||
} | |||
|
|||
/// Regression test for a bug where receive_imf() failed | |||
/// if the sender of a message also put itself into the recipients list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"recipients list" should be replaced with the "To header"?
Actual recipients list is RCPT TO.
Yes, I think it's better for regression test to have saved .eml because Mimefactory will change over time. |
3a41d3a
to
6802717
Compare
This adds a test for #7032, but I created it as a separate PR because I'm not sure about this test.
The crash happened if you received a message that has the from contact also in the "To: " and "Chat-Group-Member-Fpr: " headers. Not sure how it happened that such a message was created; I managed to create one in a test, but needed to access some internals of MimeFactory for that.
Maybe we should save the email that is sent by Alice into the test-data directory, and then make a test that Bob doesn't crash if he receives this email. And as a sanity-check, also test that Bob marks Fiona as verified after receiving this email.