CSP - invalid scheme in directive value causes exception

RESOLVED DUPLICATE of bug 548949

Status

()

defect
RESOLVED DUPLICATE of bug 548949
9 years ago
9 years ago

People

(Reporter: bsterne, Assigned: geekboy)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

To reproduce, send a policy such as:
X-Content-Security-Policy: allow foo:

The following exception goes uncaught:
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'[JavaScript Error: "this._host.clone is not a function" {file: "resource://gre/modules/CSPUtils.jsm" line: 1082}]' when calling method: [nsIContentSecurityPolicy::refinePolicy]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "<unknown>"  data: yes]
************************************************************

Should that line just be:
aClone._host = this._host ? this._host : undefined;

Assigning to :geekboy 'cause he'll fix this quick-like.
I think this is solved by the patch in bug 548949.
Confirmed fixed in http://hg.mozilla.org/mozilla-central/rev/91a749304ec9 (which is newer than the rev where bug 548949 landed).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 548949
You need to log in before you can comment on or make changes to this bug.