mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 06:26:30 +03:00
fix: update mailparse to 0.16.1 to fix panic when parsing a message
This commit is contained in:
@@ -312,6 +312,19 @@ fn test_mailparse_content_type() {
|
||||
);
|
||||
}
|
||||
|
||||
/// Test to reproduce
|
||||
/// <https://github.com/staktrace/mailparse/issues/130>.
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_mailparse_0_16_0_panic() {
|
||||
let context = TestContext::new_alice().await;
|
||||
let raw = include_bytes!("../../test-data/message/mailparse-0.16.0-panic.eml");
|
||||
|
||||
// There should be an error, but no panic.
|
||||
assert!(MimeMessage::from_bytes(&context.ctx, &raw[..], None)
|
||||
.await
|
||||
.is_err());
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_parse_first_addr() {
|
||||
let context = TestContext::new().await;
|
||||
|
||||
Reference in New Issue
Block a user