-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Message headers: skip records with unsupported characters (#546)
- Loading branch information
1 parent
c2e4d72
commit c8e26a0
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1067,4 +1067,20 @@ public function testGbkCharsetDecoding(): void | |
|
||
static::assertSame('Hi', \trim($message->getDecodedContent())); | ||
} | ||
|
||
public function testUndefinedCharset(): void | ||
{ | ||
$this->mailbox->addMessage($this->getFixture('undefined_charset_header')); | ||
|
||
$message = $this->mailbox->getMessage(1); | ||
|
||
$headers = $message->getHeaders(); | ||
|
||
static::assertCount(1, $message->getTo()); | ||
static::assertSame('<[email protected]>', $headers['message_id']); | ||
static::assertArrayNotHasKey('subject', $headers); | ||
static::assertArrayNotHasKey('from', $headers); | ||
static::assertNull($message->getSubject()); | ||
static::assertNull($message->getFrom()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
X-Real-To: <[email protected]> | ||
X-Stored-In: BlaBla | ||
Return-Path: <[email protected]> | ||
Received: from <[email protected]> | ||
by bla.bla (CommuniGate Pro RULE 6.1.13) | ||
with RULE id 14057804; Mon, 27 Feb 2017 13:21:44 +0930 | ||
X-Autogenerated: Mirror | ||
Resent-From: <[email protected]> | ||
Resent-Date: Mon, 27 Feb 2017 13:21:44 +0930 | ||
Message-Id: <[email protected]> | ||
From: =?X-IAS-German?B?bXlHb3Y=?=<[email protected]> | ||
To: [email protected] | ||
Subject: =?X-IAS-German?B?U3VibWl0IHlvdXIgdGF4IHJlZnVuZCB8IEF1c3RyYWxpYW4gVGF4YXRpb24gT2ZmaWNlLg==?= | ||
Date: 27 Feb 2017 04:51:29 +0100 | ||
MIME-Version: 1.0 | ||
Content-Type: text/html; | ||
charset="iso-8859-1" | ||
Content-Transfer-Encoding: quoted-printable | ||
|
||
) |