-
Notifications
You must be signed in to change notification settings - Fork 23
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
Base URL handling should escape any pattern characters #170
Comments
Seems reasonable to me. I don't see any backward compatibility issues. I assume this would be urlpattern backslash escaping and not percent encoding of values. We might have to be careful to detect if someone has already backslash escaped a value in the input, though. |
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this issue
Nov 10, 2022
This addresses the problem described in this spec issue: whatwg/urlpattern#170 Bug: 1380534 Change-Id: I37b5f77e674f8c23ff59e6224d92c7a0d767e7cf
wanderview
added a commit
that referenced
this issue
Nov 11, 2022
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this issue
Nov 11, 2022
This addresses the problem described in this spec issue: whatwg/urlpattern#170 And this spec PR: whatwg/urlpattern#172 Bug: 1380534 Change-Id: I37b5f77e674f8c23ff59e6224d92c7a0d767e7cf
wanderview
added a commit
that referenced
this issue
Nov 15, 2022
wanderview
added a commit
that referenced
this issue
Nov 15, 2022
aarongable
pushed a commit
to chromium/chromium
that referenced
this issue
Nov 15, 2022
This addresses the problem described in this spec issue: whatwg/urlpattern#170 And this spec PR: whatwg/urlpattern#172 Bug: 1380534 Change-Id: I37b5f77e674f8c23ff59e6224d92c7a0d767e7cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4020802 Commit-Queue: Ben Kelly <[email protected]> Reviewed-by: Jeremy Roman <[email protected]> Cr-Commit-Position: refs/heads/main@{#1071919}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this issue
Nov 16, 2022
This addresses the problem described in this spec issue: whatwg/urlpattern#170 And this spec PR: whatwg/urlpattern#172 Bug: 1380534 Change-Id: I37b5f77e674f8c23ff59e6224d92c7a0d767e7cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4020802 Commit-Queue: Ben Kelly <[email protected]> Reviewed-by: Jeremy Roman <[email protected]> Cr-Commit-Position: refs/heads/main@{#1071919}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this issue
Nov 17, 2022
This addresses the problem described in this spec issue: whatwg/urlpattern#170 And this spec PR: whatwg/urlpattern#172 Bug: 1380534 Change-Id: I37b5f77e674f8c23ff59e6224d92c7a0d767e7cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4020802 Commit-Queue: Ben Kelly <[email protected]> Reviewed-by: Jeremy Roman <[email protected]> Cr-Commit-Position: refs/heads/main@{#1071919}
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this issue
Nov 21, 2022
…s., a=testonly Automatic update from web-platform-tests URLPattern: Escape pattern baseURL values. This addresses the problem described in this spec issue: whatwg/urlpattern#170 And this spec PR: whatwg/urlpattern#172 Bug: 1380534 Change-Id: I37b5f77e674f8c23ff59e6224d92c7a0d767e7cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4020802 Commit-Queue: Ben Kelly <[email protected]> Reviewed-by: Jeremy Roman <[email protected]> Cr-Commit-Position: refs/heads/main@{#1071919} -- wpt-commits: 77d95d52351ebf51bc80ee21eea455de31a5e356 wpt-pr: 36923
jamienicol
pushed a commit
to jamienicol/gecko
that referenced
this issue
Nov 21, 2022
…s., a=testonly Automatic update from web-platform-tests URLPattern: Escape pattern baseURL values. This addresses the problem described in this spec issue: whatwg/urlpattern#170 And this spec PR: whatwg/urlpattern#172 Bug: 1380534 Change-Id: I37b5f77e674f8c23ff59e6224d92c7a0d767e7cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4020802 Commit-Queue: Ben Kelly <[email protected]> Reviewed-by: Jeremy Roman <[email protected]> Cr-Commit-Position: refs/heads/main@{#1071919} -- wpt-commits: 77d95d52351ebf51bc80ee21eea455de31a5e356 wpt-pr: 36923
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, if the base URL contains any special pattern characters such as
+
and*
, these gain special meaning in the pattern. Instead, they should have whatever escaping is required to make them simply literal characters.Currently, things such as this fail:
new URLPattern({baseURL: 'https://chromium-review.googlesource.com/c/chromium/src/+/123456'})
. Other URLs might be valid but introduce unintended wildcards.I think it's reasonable for authors to expect that
new URLPattern({baseURL})
will succeed ifbaseURL
is a valid URL, and that it will match exactly that URL.The text was updated successfully, but these errors were encountered: