Closed Bug 1432749 Opened 6 years ago Closed 4 years ago

Parsing of window.open features is way too liberal

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

59 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: nox, Assigned: arai)

References

Details

Attachments

(2 files)

Specification: https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-tokenize

When passed "scre enx=300", Gecko will just strip all whitespace and happily open a 300px wide window. This shouldn't happen.
Err, I meant "wid th=300" instead of "scre enx=300", for the window width. This does not change the fact that there is indeed a bug in the parsing code, though.
Priority: -- → P3
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED

WindowFeature provides the tokenization and access to the map.

This change changes the following behavior:

  • "*" value is removed, given it's unused.
    • Default width and default height handling is removed,
      given there's no callsites
  • Some chrome-priv feature handling becomes stricter:
    • All substring match is removed and directly checks the item in the map

Depends on D67724

Attachment #9134864 - Attachment description: Bug 1432749 - Introduce WindowFeature class with spec-compliant tokenization, and use it both in nsGlobalWindowOuter and nsWindowWatcher. r?smaug! → Bug 1432749 - Part 2: Introduce WindowFeature class with spec-compliant tokenization, and use it both in nsGlobalWindowOuter and nsWindowWatcher. r?smaug!
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/a95f77732a1c
Part 1: Add DefaultHasher for nsTString. r=smaug
https://hg.mozilla.org/integration/autoland/rev/7e96d4acf317
Part 2: Introduce WindowFeature class with spec-compliant tokenization, and use it both in nsGlobalWindowOuter and nsWindowWatcher. r=smaug
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/77ad3abbfcb9
Part 1: Add DefaultHasher for nsTString. r=smaug
https://hg.mozilla.org/integration/autoland/rev/4a7e74f6a2e3
Part 2: Introduce WindowFeature class with spec-compliant tokenization, and use it both in nsGlobalWindowOuter and nsWindowWatcher. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Flags: needinfo?(arai.unmht)
Regressions: 1630264
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: