[#5792] Notice: Uninitialized string offset: 0 in /usr/share/horde3/imp/lib/MIME/Viewer/plain.php on line 132
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 Download
errorSource.mail Download
Milestone
Patch

History
05/12/2008 jaaa (at) pobox (dot) sk Comment #14 Reply to this comment
any patches ? i have the same problem
05/05/2008 jason (at) linuxbox (dot) com Comment #13 Reply to this comment
Thanks for pointing that out.  Sounds like the same issue, but I don't see that it has been resolved in plain.php yet.
05/05/2008 Michael Slusarz Comment #12
State ⇒ Accepted
Assigned to Michael Slusarz
Reply to this comment
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
04/30/2008 jason (at) linuxbox (dot) com Comment #11 Reply to this comment
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.
01/26/2008 horde (dot) 20 (dot) orzelf (at) spamgourmet (dot) com Comment #10 Reply to this comment
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.
12/28/2007 Chuck Hagenbuch State ⇒ No Feedback
 
12/18/2007 Jan Schneider Comment #9 Reply to this comment
Any news?
11/30/2007 Chuck Hagenbuch State ⇒ Feedback
 
11/30/2007 stefan (at) frech (dot) ch Comment #8 Reply to this comment
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)(( *(&gt;\s?)+(?! ?&gt;).*?)(\n|$)(?! *(&gt; ?)+))/s'

Will keep you updated as soon as I found out more.

Stefan
10/30/2007 bruno (at) viaip (dot) com (dot) br Comment #7 Reply to this comment
We are having the same problem with long messages.
10/17/2007 Michael Slusarz Comment #6 Reply to this comment
Renders fine for me also (using HEAD).
10/12/2007 Jan Schneider Comment #5
State ⇒ Not A Bug
Reply to this comment
Both messages render perfectly fine for me. This has to be a buggy c-client version installed on your systems.
10/11/2007 Otto (dot) Stolz (at) uni-konstanz (dot) de Comment #4
New Attachment: Beispiel-3.eml Download
Reply to this comment
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.
10/10/2007 peter (dot) riche (at) free (dot) fr Comment #3
New Attachment: errorSource.mail Download
Reply to this comment
> You have to provide an example message.
10/10/2007 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
You have to provide an example message.
10/10/2007 peter (dot) riche (at) free (dot) fr Comment #1
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
Reply to this comment
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