Closed Bug 1440663 Opened 8 years ago Closed 8 years ago

Don't let nsDocumentOpenInfo::DispatchContent indefinitely loop

Categories

(Core :: DOM: Navigation, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: mayhemer, Assigned: mayhemer)

Details

Attachments

(1 file)

See bug 1343536 comment 15. The idea is to simply add a depth counter and let it be (preferable?) 20 max. Then bail and forward to external helper. The change would be somewhere around nsDocumentOpenInfo::ConvertData called from inside nsDocumentOpenInfo::DispatchContent
We can do that as basically a workaround for broken converters, yeah...
Priority: -- → P2
Attached patch v1Splinter Review
so, nsDocumentOpenInfo::ConvertData which creates a nested nsDocumentOpenInfo object keeps a counter that is there decreased on every new recursion. the nice thing is that just throwing from inside nsDocumentOpenInfo::ConvertData will fall back to the external helper app service and ask the user to download or run an app for the content (we don't spit a cryptic error or silently fail). a new pref added for it, defaults at 20: general.document_open_conversion_depth_limit feel free to suggest a better name/namespace
Attachment #8953481 - Flags: review?(bugs)
Attachment #8953481 - Flags: review?(bugs) → review+
Keywords: checkin-needed
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/mozilla-inbound/rev/9943503f940c Add a preference to limit document opening data conversion recursion depth to nsDocumentOpenInfo, r=smaug
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: