Re: Viewing MIME HTML attachments containing style elements with no attributes causes an error in 1.4.22
Paul Lesniewski <[email protected]> Fri, 2 Sep 2011 02:41:45 -0700
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Message-ID | <CAHog117GRoPoORVzXHSTZ=c=HKjZ=2f+_MuVFSsRe1hgkTytrw@mail.gmail.com> |
On Thu, Sep 1, 2011 at 3:14 PM, Abbott <[email protected]> wrote: > Warning: Variable passed to each() is not an array or object in /usr/local/cpanel/base/3rdparty/squirrelmail/functions/mime.php on line 1594 Try a snapshot download of version 1.4.23 available on our downloads page. Also, FYI, you might try searching the mailing list archives before posting or trying to fix something. > Message occurs when receiving an attachment something like the following: > > Content-Disposition: attachment > Content-Transfer-Encoding: quoted-printable > Content-Type: text/html; charset=utf-8 > > <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> > <html><head><style><!-- pre { color:red; } --></style></head><body> > <pre><span style="color: #ff0000">Some text.</span></pre> > </body></html> > > If the style element has attributes, it seems to work fine. It only seems to be an issue if a style element has no attributes. We resolved the issue for our customers using the following patch. > > --- squirrelmail-webmail-1.4.22/functions/mime.php 2011-07-11 23:53:11.000000000 -0500 > +++ squirrelmail-webmail-1.4.22.cp/functions/mime.php 2011-09-01 16:44:35.000000000 -0500 > @@ -1591,6 +1591,10 @@ > $mailbox > ){ > $me = 'sq_fixatts'; > + // cpanel patch (case 52197): mime errors with style tags that have no attributes > + if (!is_array($attary)){ > + $attary = Array(); > + } > while (list($attname, $attvalue) = each($attary)){ > /** > * See if this attribute should be removed. -- Paul Lesniewski SquirrelMail Team Please support Open Source Software by donating to SquirrelMail! http://squirrelmail.org/donate_paul_lesniewski.php ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev ----- squirrelmail-devel mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: [email protected] List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel