Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug,annevk
Differential Revision: https://phabricator.services.mozilla.com/D62811
This commit is contained in:
@@ -473,7 +473,10 @@ Maybe<nsStyleLinkElement::SheetInfo> HTMLLinkElement::GetStyleSheetInfo() {
|
||||
referrerInfo->InitWithNode(this);
|
||||
|
||||
nsAutoString nonce;
|
||||
GetAttr(kNameSpaceID_None, nsGkAtoms::nonce, nonce);
|
||||
nsString* cspNonce = static_cast<nsString*>(GetProperty(nsGkAtoms::nonce));
|
||||
if (cspNonce) {
|
||||
nonce = *cspNonce;
|
||||
}
|
||||
|
||||
return Some(SheetInfo{
|
||||
*OwnerDoc(),
|
||||
|
||||
Reference in New Issue
Block a user