webRequest.onBeforeRequest redirectUrl CSP error when http://127.0.0.1

RESOLVED DUPLICATE of bug 1256122

Status

()

Toolkit
WebExtensions: Untriaged
RESOLVED DUPLICATE of bug 1256122
a year ago
a year ago

People

(Reporter: noitidart, Unassigned)

Tracking

53 Branch
Points:
---

Firefox Tracking Flags

(firefox53 affected)

Details

(Reporter)

Description

a year ago
function oauthWebRequestListener({ url, tabId:tabid }) {
	return { redirectUrl: chrome.runtime.getURL('auth.html') };
}

chrome.webRequest.onBeforeRequest.addListener(oauthWebRequestListener, { urls: [ 'http://127.0.0.1/trigger_*'] }, ['blocking']);

On redirect, the URL in the browser doesn't change and this CSP error is given:

Security Error: Content at http://127.0.0.1/trigger_github?code=4a1d7b1a8cadbea98f0f&state=trigger may not load or link to jar:file:///C:/Users/Mercurius/Documents/GitHub/Trigger/_dist1479594772935.xpi!/webextension/pages/auth.html.

I tried adding it to manifest.json like this:

	"web_accessible_resources": ["pages/auth.html"]

However this did not fix the CSP error.
(Reporter)

Updated

a year ago
Component: Plug-ins → WebExtensions: Untriaged
Product: Core → Toolkit
(Reporter)

Comment 1

a year ago
Here is the permissions in my manifest.json:

	"permissions": [
		"<all_urls>",
		"activeTab",
		"alarms",
		"bookmarks",
		"contextMenus",
		"cookies",
		"downloads",
		"downloads.open",
		"history",
		"idle",
		"management",
		"nativeMessaging",
		"notifications",
		"sessions",
		"storage",
		"tabs",
		"topSites",
		"webNavigation",
		"webRequest",
		"webRequestBlocking"
	],
It sounds like you want bug 1305421.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1256122
You need to log in before you can comment on or make changes to this bug.