Skip to content

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

Merged
merged 5 commits into from
Jul 24, 2025

Conversation

Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented Jul 22, 2025

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.

@Hocuri Hocuri requested review from link2xt and iequidoo July 22, 2025 21:04
@@ -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.
Copy link
Collaborator

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.

@link2xt
Copy link
Collaborator

link2xt commented Jul 22, 2025

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.

Yes, I think it's better for regression test to have saved .eml because Mimefactory will change over time.

Base automatically changed from hoc/fix-verification-crash to main July 23, 2025 09:09
@Hocuri Hocuri force-pushed the hoc/fix-verification-crash-test branch from 3a41d3a to 6802717 Compare July 23, 2025 12:31
@Hocuri Hocuri requested a review from link2xt July 23, 2025 14:38
@Hocuri Hocuri merged commit 8541455 into main Jul 24, 2025
26 of 29 checks passed
@Hocuri Hocuri deleted the hoc/fix-verification-crash-test branch July 24, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants