PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Mail » Mail_Mime » Bug #9536

Error in parsing attachment filename

Details

Submitted2006-12-04 14:42 UTC
Fromguillaume at cybercat dot ca
Assignedcipri
StatusDuplicate
PackageMail_Mime
PHP VersionIrrelevant
OSLinux, but irrelevant
Roadmaps(Not assigned)

Comments

[2006-12-04 14:42 UTC] guillaume at cybercat dot ca

Description:
------------
When I parse an email with attached files, I think I have found a pattern where the attachment is detected, but the filename is not returned from _parseHeaderValue().

I don't undertand the regex on line 454, so here's what I found out:
12345678901.txt - works
12345678901'.txt - works
123456'78901.txt - works

123456789012.txt - works
123456789012'.txt - DOESN'T WORK
123456'789012.txt - works

1234567890123.txt - works
1234567890123'.txt - DOESN'T WORK
123456'7890123.txt - works

As the filename gets longer, the patterns stays the same: if there's an appostrophe before the "dot" from the filename, the filename is not returned.

Expected result:
----------------
123456789012'.txt

Actual result:
--------------
An incomplete array

[2006-12-04 14:49 UTC] guillaume at cybercat dot ca

The correction proposed by "sebastian dot cristeanospam at bitnet dot info" on http://pear.php.net/bugs/bug.php?id=4585 seems to fix the problem.