Пример #1
0
bool
nsCSPDirective::restrictsContentType(nsContentPolicyType aContentType) const
{
  // make sure we do not check for the default src before any other sources
  if (isDefaultDirective()) {
    return false;
  }
  return mDirective == CSP_ContentTypeToDirective(aContentType);
}
Пример #2
0
bool
nsCSPDirective::directiveNameEqualsContentType(nsContentPolicyType aContentType) const
{
  // make sure we do not check for the default src before any other sources
  if (isDefaultDirective()) {
    return false;
  }

  // BLock XSLT as script, see bug 910139
  if (aContentType == nsIContentPolicy::TYPE_XSLT) {
    aContentType = nsIContentPolicy::TYPE_SCRIPT;
  }
  return aContentType == CSP_DirectiveToContentType(mDirective);
}