Bug 1542807 part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets. r=ckerschb

As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts.  The document certainly has no authority
to block those from loading.  (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)

Differential Revision: https://phabricator.services.mozilla.com/D111695
This commit is contained in:
Mats Palmgren
2021-06-14 01:22:06 +00:00
parent 825a2a32c7
commit c50393b1de
12 changed files with 27 additions and 4 deletions

View File

@@ -804,6 +804,7 @@ MozContentPolicyType GetContentPolicyType(ExtContentPolicyType aType) {
case ExtContentPolicy::TYPE_DTD:
return MozContentPolicyType::Xml_dtd;
case ExtContentPolicy::TYPE_FONT:
case ExtContentPolicy::TYPE_UA_FONT:
return MozContentPolicyType::Font;
case ExtContentPolicy::TYPE_MEDIA:
return MozContentPolicyType::Media;