Skip to content

Commit

Permalink
Added test to multibyte malformed continuation
Browse files Browse the repository at this point in the history
Signed-off-by: Edgard <edgardmessias@gmail.com>
  • Loading branch information
edgardmessias committed Jan 28, 2021
1 parent 2f81aed commit 35e0828
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/Header/ContentDispositionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ public function setDispositionProvider(): array
// @codingStandardsIgnoreEnd
}

public function testMultibyteMalformedContinuation(): void
{
$header = "Content-Disposition: attachment;\r\n filename*0=\"=?gb2312?B?MjQuMS2zpM7EvP7D+6Osvau1vNbCxNrI3bSm1sOx6s231tC1x?=\";\r\n filename*1=\"=?gb2312?B?MGs0PjQ0C50eHQ=?=\"";
$filename = '24.1-长文件名,将导致内容处置标头中的连续行.txt';

$header = ContentDisposition::fromString($header);

$this->assertEquals($filename, $header->getParameter('filename'));
}

public function invalidParametersProvider(): array
{
$invalidArgumentException = InvalidArgumentException::class;
Expand Down

0 comments on commit 35e0828

Please sign in to comment.