Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.12

Bug #915 Cannot decode MIME when set specific PHP Enviormental value.
Submitted: 2004-02-27 04:33 UTC
From: vishnu76 at dreamwiz dot com Assigned:
Status: Bogus Package: Mail_Mime
PHP Version: 4.3.4 OS: RedHat 7.0
Roadmaps: (Not assigned)    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2004-05-20 04:30 UTC
Package:
Bug Type:
Summary:
From: vishnu76 at dreamwiz dot com
New email:
PHP Version: Package Version: OS:

 

 [2004-02-27 04:33 UTC] vishnu76 at dreamwiz dot com
Description: ------------ Cannot decode Multipart MIME data at specific case. Many Korean PHP Web Hosting service is setted "magic_quotes_gpc" is true. At that time Mail_MimeDecode::decode() function cannot decode multipart mime data. Reproduce code: --------------- For example, see below mime header. MIME-Version: 1.0 Content-Type: multipart/related; boundary="=_mime_boundary" --=_mime_boundary Content-Type: text/html; charset="euc_kr" Content-Transfer-Encoding: base64 If PHP is setted gpc_magic_quotes is TRUE, above code will be change like under codes. MIME-Version: 1.0 Content-Type: multipart/related; boundary=\"=_mime_boundary\" --=_mime_boundary Content-Type: text/html; charset=\"euc_kr\" Content-Transfer-Encoding: base64 Now, PEAR MIME Package cannot decode Above mime data. Expected result: ---------------- PEAR Package must decode mime data. Actual result: -------------- I have change _parseHeaderValue function in PEAR MIME Package. See Below.. for ($i = 0; $i < count($parameters); $i++) { $param_name = substr($parameters[$i], 0, $pos = strpos($parameters[$i], '=')); $param_value = substr($parameters[$i], $pos + 1); //Debug if(get_magic_quotes_gpc()) $param_value = stripslashes($param_value); //Debug if ($param_value[0] == '"') { $param_value = substr($param_value, 1, -1); } $return['other'][$param_name] = $param_value; $return['other'][strtolower($param_name)] = $param_value; }

Comments

 [2004-02-27 08:21 UTC] neufeind at php dot net
Where from do you get your input mime-data? Is it data sent to your script by a POST-form or something? The name "gpc" explains that normally only data coming from GET, POST or COOKIE should be affected ...
 [2004-02-27 23:44 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!