Consider throttle the navigation rather raising exceptions when the pushState limit is hit
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
People
(Reporter: sefeng, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: webcompat:platform-bug)
We failed to load https://bugzilla.mozilla.org/show_bug.cgi?id=1947479#c0 due this https://searchfox.org/mozilla-central/rev/e8da1e780e9b8ed2fd82a3b8d79c5f93e72697d3/docshell/base/BrowsingContext.cpp#3874,3898-3900 exception is raised.
Looks like what Chrome does is they don't raise the exception, but rather they throttle the navigation. I see a message Throttling navigation to prevent the browser from hanging. See https://crbug.com/1038223. Command line switch --disable-ipc-flooding-protection can be used to bypass the protection
in Chrome's developer console when loading the same site.
Should we consider to do the same as Chrome?
Updated•13 days ago
|
Comment 2•13 days ago
•
|
||
Throttling would be really nice!
Would it be worthwhile to have a general IPC flooding protection? There are many APIs which can be used to IPC flood the parent, including document.cookie
IIRC. I'm unsure how feasible this is. The last time I talked about this with IPC folks (5 years ago) they didn't like the idea very much.
See Bug 1588509.
Also see DoS section here: https://eviltrap.site/
Comment 3•12 days ago
|
||
What does throttling mean here? Silently ignoring pushState
calls seems rather problematic (also, see https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/history.cc;drc=5f14562c01775211a40ebc3056d0a773c3569008;l=336).
Comment 4•8 days ago
|
||
dom.navigation.navigationRateLimit.timespan is also very very long. 10 seconds is a lot.
Comment 5•8 days ago
|
||
sefeng, could you try some shorter timespan for now? Tweaking the pref value would be a simple tweak.
Comment 6•8 days ago
|
||
nm, peterv tested already https://bugzilla.mozilla.org/show_bug.cgi?id=1947479#c5
Reporter | ||
Comment 7•8 days ago
|
||
Given Chrome isn't doing anything special, I am closing this bug. So that we can keep the conversation in bug 1947479.
Comment 8•8 days ago
|
||
What you mean Chrome isn't doing anything special? Aren't they dropping pushState calls if there are "too many"?
Reporter | ||
Comment 9•8 days ago
|
||
I mean they aren't really doing anything different than us. They use the same rate, it's just they don't throw the exception. Initially I filed this bug because I thought they had some special "throttling" mechanism to not dropping those calls, but apparently that wasn't the case.
Description
•