mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Issue #2466 - Part 2: Implement script-src-elem and script-src-attr
This commit is contained in:
parent
4ea2206c15
commit
ff01a35bdb
12 changed files with 117 additions and 36 deletions
|
|
@ -179,8 +179,10 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
|
|||
rv = principal->GetCsp(getter_AddRefs(csp));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (csp) {
|
||||
// javascript: is a "navigation" type, so script-src-elem applies.
|
||||
// https://w3c.github.io/webappsec-csp/#effective-directive-for-inline-check
|
||||
bool allowsInlineScript = true;
|
||||
rv = csp->GetAllowsInline(nsIContentSecurityPolicy::SCRIPT_SRC_DIRECTIVE,
|
||||
rv = csp->GetAllowsInline(nsIContentSecurityPolicy::SCRIPT_SRC_ELEM_DIRECTIVE,
|
||||
EmptyString(), // aNonce
|
||||
true, // aParserCreated
|
||||
EmptyString(), // aContent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue