From bde85428d69069637782d9507475df78890f08d0 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 10 May 2013 03:37:25 -0400
Subject: [PATCH] Fix handling of invalid email addresses in headers (#1489092)

---
 tests/Framework/Mime.php |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tests/Framework/Mime.php b/tests/Framework/Mime.php
index 61123dd..d9f4163 100644
--- a/tests/Framework/Mime.php
+++ b/tests/Framework/Mime.php
@@ -39,6 +39,8 @@
             19 => 'Test <"test test"@domain.tld>',
             20 => '<"test test"@domain.tld>',
             21 => '"test test"@domain.tld',
+            // invalid (#1489092)
+            22 => '"John Doe @ SomeBusinessName" <MAILER-DAEMON>',
         );
 
         $results = array(
@@ -64,6 +66,8 @@
             19 => array(1, 'Test', '"test test"@domain.tld'),
             20 => array(1, '', '"test test"@domain.tld'),
             21 => array(1, '', '"test test"@domain.tld'),
+            // invalid (#1489092)
+            22 => array(1, 'John Doe @ SomeBusinessName', 'MAILER-DAEMON'),
         );
 
         foreach ($headers as $idx => $header) {
@@ -185,6 +189,10 @@
                 array("----------------------------------------------------------------------------------------\nabc                        def123456789012345", 76),
                 "----------------------------------------------------------------------------------------\nabc                        def123456789012345",
             ),
+            array(
+                array("-------\nabc def", 5),
+                "-------\nabc\ndef",
+            ),
         );
 
         foreach ($samples as $sample) {

--
Gitblit v1.9.1