Closed Bug 210658 Opened 21 years ago Closed 20 years ago

hanging with html elements: parsererror, sourcetext

Categories

(Core :: DOM: HTML Parser, defect)

x86
All
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: habere, Assigned: mrbkap)

References

Details

(Keywords: hang, testcase, verified1.7.13)

Attachments

(4 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030618 Debian/1.3.1-3
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030618 Debian/1.3.1-3

mozilla hangs with 100% cpu usage with the (mozilla?) browser specific html:

<parsererror> or <sourcetext>

it's not surprising that this happens with every version of mozilla since it's
in both the current and 1.0 source.


Reproducible: Always

Steps to Reproduce:
(warning: this will *hang* you mozilla)
1. open up either attached testcase

Actual Results:  
mozilla hangs

Expected Results:  
i think you're supposed to safely ignore elements you don't know.


parsererror and sourcetext defined:

http://lxr.mozilla.org/mozilla1.0/source/htmlparser/src/nsHTMLTags.cpp
http://lxr.mozilla.org/mozilla/source/htmlparser/src/nsHTMLTags.cpp
Attached file parsererror testcase
warning: this will *hang* mozilla
Attached file sourcetext testcase
warning: this will *hang* mozilla
Severity: normal → major
Keywords: hang, testcase
Hangs my 1.4rc3
Hangs my 1.4 Final
Status: UNCONFIRMED → NEW
Ever confirmed: true
I recently got an HTML message from an OE user that hung Mozilla 1.5 Messenger,
and I tracked the problem down to a sourcetext element. It's enough to tell
Mozilla to open a file named hang.eml with these lines:

Content-type: text/html

<SOURCETEXT>
hangs my 1.8a (nightly from 2004/04/22)
I'm not sure what the code is trying to achieve, but if the child element's
first root tag can't contain it then it goes into an infinite loop.
There doesn't seem to be a reason to actually support these in the HTML parser,
as these are XML tags. This patch removes support for them.
Assignee: harishd → mrbkap
Status: NEW → ASSIGNED
Comment on attachment 158551 [details] [diff] [review]
remove HTML support for <parsererror> and <sourcetext>

Looking for r=.
Attachment #158551 - Flags: review?(bzbarsky)
Fix parser/htmlparser/tools/gentags.pl as well?
Attached patch patch v2Splinter Review
Sorry...forgot to include that in the diff...updated patch.
Attachment #158551 - Attachment is obsolete: true
Attachment #158762 - Flags: review?(bzbarsky)
Attachment #158551 - Flags: review?(bzbarsky)
Comment on attachment 158762 [details] [diff] [review]
patch v2

r+sr=bzbarsky
Attachment #158762 - Flags: superreview+
Attachment #158762 - Flags: review?(bzbarsky)
Attachment #158762 - Flags: review+
Checked in for 1.8a4
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 312844 has been marked as a duplicate of this bug. ***
*** Bug 312870 has been marked as a duplicate of this bug. ***
This is the DoS hang described at http://www.whitedust.net/speaks/1432/ recently
Flags: blocking1.7.13?
Flags: blocking-aviary1.0.8?
Flags: blocking1.7.13?
Flags: blocking1.7.13+
Flags: blocking-aviary1.0.8?
Flags: blocking-aviary1.0.8+
Attachment #210836 - Flags: approval1.7.13?
Attachment #210836 - Flags: approval-aviary1.0.8?
Comment on attachment 210836 [details] [diff] [review]
moz1.7 version of patch v2

a sanity check from Blake would be good.
Attachment #210836 - Flags: review?(mrbkap)
Attachment #210836 - Flags: review?(mrbkap) → review+
Comment on attachment 210836 [details] [diff] [review]
moz1.7 version of patch v2

a=timr.  Important hang to fix.
Attachment #210836 - Flags: approval1.7.13?
Attachment #210836 - Flags: approval1.7.13+
Attachment #210836 - Flags: approval-aviary1.0.8?
Attachment #210836 - Flags: approval-aviary1.0.8+
Fix checked into the moz1.7/aviary101 branches
verified with:
Windows:
Moz - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060215
Fx - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060215
Firefox/1.0.8
Macintosh:
Moz - Mozilla/5.0 (Macintosh; U;PPC Mac OS X Mach-O; en-US; rv:1.7.13)
Gecko/20060215 Firefox/1.0.8
Fx - Mozilla/5.0 (Macintosh; U;PPC Mac OS X Mach-O; en-US; rv:1.7.13)
Gecko/20060215 Firefox/1.0.8
Linux
Moz - Mozilla/5.0 (X11; U;Linux i686; en-US; rv:1.7.13) Gecko/20060215
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: