Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions php_mailparse_mime.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static struct php_mimeheader_with_attributes *php_mimeheader_alloc_from_tok(php_
*
* Original rfc2231 support by IceWarp Ltd. <info@icewarp.com>
*/
currentencoded = 0;
check_name = strchr(name, '*');
if (check_name) {
currentencoded = 1;
Expand Down
18 changes: 18 additions & 0 deletions tests/rfc2231_plain_after_encoded.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--TEST--
A plain parameter following an RFC2231 (name*N) parameter is not leaked
--SKIPIF--
<?php if (!extension_loaded("mailparse")) print "skip"; ?>
--FILE--
<?php
$m = mailparse_msg_create();
mailparse_msg_parse($m, "Content-Type: x/y; a*0=\"foo\"; a*1=\"bar\"; b=\"baz\"\n\nbody\n");
$d = mailparse_msg_get_part_data($m);
var_dump($d['content-a']);
var_dump($d['content-b']);
mailparse_msg_free($m);
echo "done\n";
?>
--EXPECT--
string(6) "foobar"
string(3) "baz"
done
Loading