mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +09:00
Issue #2402 - Fix SecurityPolicyViolationEvent.violatedDirective. https://bugzilla.mozilla.org/show_bug.cgi?id=1418243
This commit is contained in:
parent
ec29404083
commit
1e0851158e
3 changed files with 80 additions and 12 deletions
|
|
@ -494,6 +494,8 @@ class nsCSPDirective {
|
|||
|
||||
bool visitSrcs(nsCSPSrcVisitor* aVisitor) const;
|
||||
|
||||
virtual void getDirName(nsAString& outStr) const;
|
||||
|
||||
protected:
|
||||
CSPDirective mDirective;
|
||||
nsTArray<nsCSPBaseSrc*> mSrcs;
|
||||
|
|
@ -572,6 +574,8 @@ class nsBlockAllMixedContentDirective : public nsCSPDirective {
|
|||
|
||||
void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs)
|
||||
{ MOZ_ASSERT(false, "block-all-mixed-content does not hold any srcs"); }
|
||||
|
||||
void getDirName(nsAString& outStr) const override;
|
||||
};
|
||||
|
||||
/* =============== nsUpgradeInsecureDirective === */
|
||||
|
|
@ -625,6 +629,8 @@ class nsUpgradeInsecureDirective : public nsCSPDirective {
|
|||
|
||||
void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs)
|
||||
{ MOZ_ASSERT(false, "upgrade-insecure-requests does not hold any srcs"); }
|
||||
|
||||
void getDirName(nsAString& outStr) const override;
|
||||
};
|
||||
|
||||
/* ===== nsRequireSRIForDirective ========================= */
|
||||
|
|
@ -642,6 +648,7 @@ class nsRequireSRIForDirective : public nsCSPDirective {
|
|||
bool restrictsContentType(nsContentPolicyType aType) const;
|
||||
bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
|
||||
bool aParserCreated) const;
|
||||
void getDirName(nsAString& outStr) const override;
|
||||
|
||||
private:
|
||||
nsTArray<nsContentPolicyType> mTypes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue