Closed
Bug 1406453
Opened 8 years ago
Closed 8 years ago
Typo in literal regular expression in toolkit/modules/addons/WebRequestContent.js
Categories
(WebExtensions :: Request Handling, defect, P3)
Tracking
(firefox57 wontfix, firefox59 fixed)
RESOLVED
FIXED
mozilla59
People
(Reporter: u603568, Assigned: mixedpuppy)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171006100327
Steps to reproduce:
I was just informally looking at the source code at:
https://hg.mozilla.org/mozilla-central/file/tip/toolkit/modules/addons/WebRequestContent.js
Actual results:
I saw the following regular expression near the top of the file:
const IS_HTTP = /^https?:|wss?:/;
I am pretty sure there is a typo in this regular expression. Currently, if `^https?:` is not matched, the alternative will be to scan the whole URL to find an instance of `wss?` -- though this must rarely happens, it can happen with data: URI (which can often be rather large.)
Expected results:
The intent was probably for the regular expression to be as follow:
const IS_HTTP = /^https?:|^wss?:/;
or
const IS_HTTP = /^(?:https?:|wss?:)/;
(whatever is best, I have no clue).
Updated•8 years ago
|
Component: Untriaged → WebExtensions: Request Handling
Product: Firefox → Toolkit
Updated•8 years ago
|
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Attachment #8928702 -
Flags: review?(kmaglione+bmo)
Comment 2•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8928702 [details]
Bug 1406453 fix http/ws regex
https://reviewboard.mozilla.org/r/199966/#review207508
Attachment #8928702 -
Flags: review?(kmaglione+bmo) → review+
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/060e71d0f8ae
fix http/ws regex r=kmag
Comment 4•8 years ago
|
||
| bugherder | ||
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•8 years ago
|
Is manual testing required on this bug? If yes, please provide some STR and the proper extension(if required) or set the “qe-verify -“ flag.
Thanks!
Flags: needinfo?(mixedpuppy)
| Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(mixedpuppy) → qe-verify-
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•