patchMHonArc - Patches: patch #7548, Don't totally mangle stupid...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7548: Don't totally mangle stupid double-HTML messages

Submitter:  Cloyce D. Spradling <cloyce>
Submitted:  Thu 02 Jun 2011 05:53:18 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Thu 02 Jun 2011 06:31:56 PM UTC, comment #1: 

Not sure if the patch can be accepted as-is.

There has been a history of performance problems when using the
non-greedy modifiers in perl regexes, especially on large
input data, so I'm reluctant to start using them.  For example,
someone creates a message that causes the regex to degenerate,
leading to a DoS.

Earl Hood <ehood>
Group administrator
Thu 02 Jun 2011 05:53:18 PM UTC, original submission:  

Some Microsoft products (Word for sure) can produce a message with an HTML body that has a structure like


<html>
<head>
...stuff...
</head>
...real message goes here...
</html>

<html>
<head>
...more stuff...
</head>
...message signature goes here...
</html>


MHonArc currently renders the HTML part of this message as just the signature.  The code responsible is the code that trims the head element -- it removes everything from the initial opening head tag to the final closing head tag, including the main body of the message.

The fix is pretty simple -- it just involves making the regexp less greedy and also making it loop as for all the other elements.

Thanks for considering this change.

Cloyce D. Spradling <cloyce>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #23496:  mhonarc-2.6.18-badhtmlfix.patch added by cloyce (831B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ehood (Posted a comment)
  • -email is unavailable- added by cloyce (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-06-02 cloyce Attached File- Added mhonarc-2.6.18-badhtmlfix.patch, #23496

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code