| Summary | Notice: Uninitialized string offset: 0 in /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on line 132 |
| Queue | IMP |
| Queue Version | 4.1.3 |
| Type | Bug |
| State | Accepted |
| Priority | 2. Medium |
| Owners | Michael Slusarz <slusarz (at) horde (dot) org> |
| Requester | peter (dot) riche (at) free (dot) fr |
| Created | 10/10/2007 (220 days ago) |
| Due | |
| Updated | 05/12/2008 (5 days ago) |
| Assigned | 11/30/2007 (169 days ago) |
| Resolved | |
| Attachments | Beispiel-3.eml ![]() errorSource.mail ![]() |
| Milestone | |
| Patch |
any patches ? i have the same problemThanks for pointing that out. Sounds like the same issue, but I don't see that it has been resolved in plain.php yet.
State ⇒ Accepted
Assigned to Michael Slusarz
Sounds like this issue we already dealt with elsewhere:http://cvs.horde.org/co.php?r=1.13&f=framework%2FText_Filter%2FFilter%2Fxss.php
I have recently run into this problem as well. I traced the problem to the preg_replace_callback function call in the postProcess function in highlightquotes.php I found an interesting commit in the repository here: http://cvs.horde.org/diff.php?sa=1&r1=1.6.8.17&r2=1.6.8.18&f=framework%2FText_Filter%2FFilter%2Fhighlightquotes.php
My investigation found that it was a PHP resource limit causing preg_replace to return NULL instead of the processed string (http://us3.php.net/manual/en/ref.pcre.php#77790). The diff above sidesteps the problem by checking the result of the function call and using the unprocessed text if NULL comes back. I think a more appropriate solution should include some notification that this error occured to alert the sysadmin and possibly some additional application logic to attempt an alternative approach if this one fails.
> I have the same problem here with linux/apache2, php5, horde 3.1.4
> and imp 4.1.4.
> The mails having this problem are all complicated (probably not html
> compliant) html messages, but not too big.
> Unfortunately, i can't give the messages for testing purpose.
I have the same problem here with linux/apache2, php5, horde 3.1.4 and imp 4.1.4.The mails having this problem are all complicated (probably not html compliant) html messages, but not too big.
Unfortunately, i can't give the messages for testing purpose.
Any news?This bug does not depend on the message size. It also doesn't depend on the c-client version (I experienced the same error with several different c-clients compiled PHP modules). As far as I found out it depends on the message content. Thus is actually _is_ a horde bug.
The Text_Filter always stumbles over the show/hide toggles for quote blocks section in "lib/Horde/Text/Filter/highlightquotes.php". Most probably the regex is faulty.
'/(\n)(( *(>\s?)+(?! ?>).*?)(\n|$)(?! *(> ?)+))/s'
Will keep you updated as soon as I found out more.
Stefan
We are having the same problem with long messages.Renders fine for me also (using HEAD).State ⇒ Not A Bug
Both messages render perfectly fine for me. This has to be a buggy c-client version installed on your systems.New Attachment: Beispiel-3.eml
Same symptom occurring with the attached message.
In plain.php, strlen($text) =29562, then Text_Filter::filter($text, $filters, $filter_params) yields an empty result, i. e. strln()=0, where
$filters = Array ( [0] => text2html
, [1] => tabs2spaces
, [2] => highlightquotes
, [3] => simplemarkup
, [4] => dimsignature
)
$filter_params = Array( [0] => Array([parselevel] => 2, [charset] => UTF-8)
, [1] => Array()
, [2] => Array([hideBlocks] =>, [citeblock] => 1)
, [3] => Array()
, [4] => Array()
)
Another message is displayed allright; in the latter case $filter_params[2][citeblock] = NULL, or = '', or = something else print_r does not display.
New Attachment: errorSource.mail
> You have to provide an example message.
State ⇒ Feedback
You have to provide an example message.Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ Notice: Uninitialized string offset: 0 in /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on line 132
Queue ⇒ IMP
Got that error with a long mail.
The display of that message is stopped at "Headers : ..."
The content of the message is not shown.
Here are the Headers : (i removed headers containing email addresses)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=iso-8859-1
Date: Tue, 9 Oct 2007 19:19:53 +0200 [09.10.2007 19:19:53 CEST]
MIME-Version: 1.0
Organization: IBE Software
Received:
* (qmail 30379 invoked from network); 9 Oct 2007 19:21:49 +0200
* from 23.mail-out.ovh.net (213.186.41.17) by s15236240.domainepardefaut.fr with SMTP; 9 Oct 2007 19:21:49 +0200
* (qmail 22863 invoked by uid 503); 9 Oct 2007 17:22:05 -0000
* (QMFILT: 1.0); 09 Oct 2007 17:22:05 -0000
* from b7.ovh.net (HELO mail73.ha.ovh.net) (213.186.33.57) by 23.mail-out.ovh.net with SMTP; 9 Oct 2007 17:22:05 -0000
* from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 9 Oct 2007 17:21:36 -0000
* from cag06-2-82-229-161-75.fbx.proxad.net (HELO jonjon-acer) (82.229.161.75) by ns0.ovh.net with SMTP; 9 Oct 2007 17:21:33 -0000
References: <OF9B0FA29A.87A768A2-ONC125736F.004AB12F-C125736F.004AE35A@amadeus.com> <1191937365.470b85552f72c@imp.free.fr>
Subject: Re[2]: privé
X-Mailer: The Bat! (v3.99.24) Professional
X-Ovh-Local: 213.186.33.20 (ns0.ovh.net)
X-Ovh-Remote: 82.229.161.75 (cag06-2-82-229-161-75.fbx.proxad.net)
X-Priority: 3 (Normal)
X-Spam-Check: DONE|H 0.5/N