mail cutoff on 'special' caharacter

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
C4Vette
Posts: 21
Joined: 28 Sep 2006, 11:57
Location: Netherlands

mail cutoff on 'special' caharacter

Post by C4Vette »

Hi,

I'm running the dev-version 0.9.0
I know; "not for production" but wanted this version because off the ability to strip the signature of the mail.

That said, I noticed something else. If there is a special character (punctuation) e.g. " é " in the content of the mail then the imported message stops right there. This can also been seen in the reply-mail I receive but the logfile of the plugin does not show the cutoff but the complete content of the mail.

Does this have to do with PHP mbstring?
I tried installing mbstring but afterwards I had no clue how to use it in the plugin. There was still nothing to select in de plugin's config screen. But I did get an extra problem; the pugin's logging showed lots of:

Code: Select all

Done checking all mailboxes
ALERT - script tried to disable memory_limit by setting it to a negative value -1 bytes which is not allowed (attacker 'REMOTE_ADDR not set', file '/srv/www/htdocs/IssueTracker/plugins/EmailReporting/pages/bug_report_mail.php', line 20)
Start checking all mailboxes: Monday 26th of March 2012 15:28:07
until I removed the mbstring packages again. (Thanks to VMware's snapshot..)

All suggestions/hints/tips are welcome.

Ed
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: mail cutoff on 'special' caharacter

Post by SL-Gundam »

mbstring is required to fix the problem with, for example, the é.

if mbstring is working properly, the option "Convert email to this charset (Should be the same as the database charset)" should be available for use on the EmailReporting configuration page. In most installations the default setting is a good value. if mbstring is not installed that setting would show "PHP mbstring extension unavailable"

The alert you get is coming from http://www.hardened-php.net/suhosin/. Which apparently you have installed. Since parsing emails can be very memory intensive EmailReporting tries to disable the memory limit. It's not a big issue if this fails but could be a problem if EmailReporting needs to parse emails with attachments. By default though the memory_limit should already be disabled in PHP as long as its being run directly without a webserver inbetween. But suhosin might have modified that behaviour
Post Reply