WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
273069
Content Scripts do not match on the URL query
https://bugs.webkit.org/show_bug.cgi?id=273069
Summary
Content Scripts do not match on the URL query
Carlos J.
Reported
2024-04-22 08:44:56 PDT
Safari incorrectly ignores the query string when matching match patterns. Giving the following match pattern: "
https://example.com/*query
*" Safari matches only when the "query" is part of the pathname, not the query string. It should also match the following URL:
https://example.com/?query=1
Example extension:
https://github.com/carlosjeurissen/webext-tech-demo-extensions/tree/main/issues/safari-content-script-query-match
Attachments
Add attachment
proposed patch, testcase, etc.
Carlos J.
Comment 1
2024-04-23 05:23:40 PDT
This has been tested in Safari 17 and Safari Technology Preview 192. In both no match is made on the URL query.
Timothy Hatcher
Comment 2
2024-05-23 10:27:36 PDT
Carlos, do you know if this is a regression from previous behavior or has Safari always behaved this way?
Radar WebKit Bug Importer
Comment 3
2024-05-23 10:27:49 PDT
<
rdar://problem/128621567
>
Carlos J.
Comment 4
2024-05-23 23:18:35 PDT
Thanks for looking into this! I can not rule out this used to work at some point in the past.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug