Bug 1106713 - fixing up CSP checks for imports. r=mrbkap

This commit is contained in:
Gabor Krizsanits
2014-12-11 13:18:10 +01:00
parent 3666eaa685
commit 3a9fd80e59
6 changed files with 50 additions and 1 deletions

View File

@@ -438,6 +438,8 @@ static bool
CSPAllowsInlineScript(nsIScriptElement *aElement, nsIDocument *aDocument)
{
nsCOMPtr<nsIContentSecurityPolicy> csp;
// Note: For imports NodePrincipal and the principal of the master are
// the same.
nsresult rv = aDocument->NodePrincipal()->GetCsp(getter_AddRefs(csp));
NS_ENSURE_SUCCESS(rv, false);