Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not initialize a URLPatternInit member to null in "initialize a URLPattern" #213

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

jeremyroman
Copy link
Collaborator

@jeremyroman jeremyroman commented Jan 26, 2024

It is not valid for the baseURL dictionary member to be null, only either absent or a USVString. Instead, this should be omitted from the dictionary altogether if no string was provided to this algorithm.

Any string which is invalid will fail later on, when it is to be parsed as a URL.

Fixes #204.

  • At least two implementers are interested (and none opposed):
    • Google Chrome
    • n/a (change is simply fixing a bug in a non-controversial way, per this comment)
  • Tests are written and can be reviewed and commented upon at:
    • n/a (this is a fix to how the spec expresses this, but does not represent a behavior change, and existing tests cover this behavior)
  • Implementation bugs are filed:
    • Chromium: n/a (believed to work correctly in Chromium)
    • Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1731418 (vendor does not yet implement the spec)
    • WebKit: [no known URLPattern bug] (vendor does not yet implement the spec)
    • Deno: n/a (no reason to believe a change is required)
    • kenchris/urlpattern-polyfill: n/a (no reason to believe a change is required)
  • MDN issue is filed: n/a (change is on a spec detail not expressly documented)
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


💥 Error: 400 Bad Request 💥

PR Preview failed to build. (Last tried on Jan 26, 2024, 5:11 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.

🔗 Related URL

If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.

…LPattern"

It is not valid for the baseURL dictionary member to be null, only
either absent or a USVString. Instead, this should be omitted from the
dictionary altogether if no string was provided to this algorithm.

Any string which is invalid will fail later on, when it is to be parsed
as a URL.

Fixes whatwg#204.
@jeremyroman jeremyroman merged commit c9c56ee into whatwg:main Jan 29, 2024
2 checks passed
@jeremyroman jeremyroman deleted the initialize-null-baseurl branch January 29, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Loose base URL check can crash URL parser
2 participants