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)

58 Branch
defect

Tracking

(firefox57 wontfix, firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox57 --- wontfix
firefox59 --- fixed

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).
Component: Untriaged → WebExtensions: Request Handling
Product: Firefox → Toolkit
Assignee: nobody → mixedpuppy
Priority: -- → P3
Attachment #8928702 - Flags: review?(kmaglione+bmo)
Attachment #8928702 - Flags: review?(kmaglione+bmo) → review+
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
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)
Flags: needinfo?(mixedpuppy) → qe-verify-
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: