Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
7ab8771989 | |||
d68c25daad |
@ -27,7 +27,7 @@ class MimeBoundaryAnalyser
|
||||
*/
|
||||
public static function isMessageLineBoundary($mimeMessageLine)
|
||||
{
|
||||
return strlen($mimeMessageLine) > 0 && $mimeMessageLine[0] === "-";
|
||||
return preg_match('/^--[0-9A-Za-z\s\'\/\+\_\,\-\.\:\=\?]+/', $mimeMessageLine) === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,6 +67,8 @@ class MimeBoundaryAnalyserTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
return [
|
||||
['-- this line is boundary', self::EXPECTED_IS_BOUNDARY],
|
||||
['--this line is boundary', self::EXPECTED_IS_BOUNDARY],
|
||||
['--@ this line is not boundary', self::EXPECTED_IS_NOT_BOUNDARY],
|
||||
['-- this line is also a boundary --', self::EXPECTED_IS_BOUNDARY],
|
||||
['mesage line -- is not boundary', self::EXPECTED_IS_NOT_BOUNDARY],
|
||||
[' -- mesage line -- is not boundary', self::EXPECTED_IS_NOT_BOUNDARY],
|
||||
|
Reference in New Issue
Block a user