Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Commit d0a361a

Browse files
committed
Validated that devServerPort is numeric
quick fix for #4753 Auditors: @bridiver Test Plan: 1. open any page 2. open console, enter window.open("chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/about-flash.html?devServerPort=foo@test.com/") 3. verify that the opened tab shows about:flash without logging console errors about scripts blocked due to CSP
1 parent 6c04eaf commit d0a361a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/extensions/brave/js/about.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
(function () {
22
var queryString = window.location.search
3-
var devServerPort = queryString && queryString.match(/devServerPort=([^&]*)/)[1]
3+
var portMatch = queryString && queryString.match(/devServerPort=([0-9]+)/)
4+
var devServerPort
5+
if (portMatch) {
6+
devServerPort = portMatch[1]
7+
}
48

59
let aboutEntryPage = 'gen/aboutPages.entry.js'
610
if (devServerPort) {

0 commit comments

Comments
 (0)