Found bug in PHP mailheader patch

Hi!

I found a bug in the mail header patch when using UTF-8.

If you have a url that contains custom chars, such as å ä ö, the mail header patch breaks that utf-8 encoding when it puts the path into the mailheader.

Anyone able to fix this?

Howto reproduce:
create a rewritten url with one of the chars å ä ö, or probably any other multibyte char. Make sure to set the header and encodings to utf-8 for that site.

Send a mail using mail();

You will then have a malformed header (see attached screenshot) and will be picked up by spamdetection softwares as "BAD HEADER".

Im not that good in coding C so i cant make a fix for this myself, hope someone here can.

(Using PHP 5.3.3 btw)
 

Attachments

  • mail-header-patch-bug.jpg
    mail-header-patch-bug.jpg
    39.5 KB · Views: 235
Inform the port maintainer or file a PR. Most people on the forums are users, not developers or ports committers.
 
Back
Top