summaryrefslogtreecommitdiffstats
path: root/dom/security/nsCSPUtils.h
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2017-08-25 10:38:52 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-02-22 11:30:29 +0100
commit896e23c20eba71bffa77cb0874b9b341e1b6c264 (patch)
tree1175498d423599b5cf56ce4788f3c64ab77b283b /dom/security/nsCSPUtils.h
parentcdcfbde10dbcf0fab0630d5ee0146be45d7a6572 (diff)
downloadUXP-896e23c20eba71bffa77cb0874b9b341e1b6c264.tar
UXP-896e23c20eba71bffa77cb0874b9b341e1b6c264.tar.gz
UXP-896e23c20eba71bffa77cb0874b9b341e1b6c264.tar.lz
UXP-896e23c20eba71bffa77cb0874b9b341e1b6c264.tar.xz
UXP-896e23c20eba71bffa77cb0874b9b341e1b6c264.zip
CSP: connect-src 'self' should always include https: and wss: schemes
Diffstat (limited to 'dom/security/nsCSPUtils.h')
-rw-r--r--dom/security/nsCSPUtils.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/dom/security/nsCSPUtils.h b/dom/security/nsCSPUtils.h
index 468c734a2..cfbe83256 100644
--- a/dom/security/nsCSPUtils.h
+++ b/dom/security/nsCSPUtils.h
@@ -186,7 +186,7 @@ nsresult CSP_AppendCSPFromHeader(nsIContentSecurityPolicy* aCsp,
class nsCSPHostSrc;
-nsCSPHostSrc* CSP_CreateHostSrcFromURI(nsIURI* aURI);
+nsCSPHostSrc* CSP_CreateHostSrcFromSelfURI(nsIURI* aSelfURI);
bool CSP_IsValidDirective(const nsAString& aDir);
bool CSP_IsDirective(const nsAString& aValue, CSPDirective aDir);
bool CSP_IsKeyword(const nsAString& aValue, enum CSPKeyword aKey);
@@ -256,6 +256,9 @@ class nsCSPHostSrc : public nsCSPBaseSrc {
void setPort(const nsAString& aPort);
void appendPath(const nsAString &aPath);
+ inline void setGeneratedFromSelfKeyword() const
+ { mGeneratedFromSelfKeyword = true;}
+
inline void setWithinFrameAncestorsDir(bool aValue) const
{ mWithinFrameAncstorsDir = aValue; }
@@ -276,6 +279,7 @@ class nsCSPHostSrc : public nsCSPBaseSrc {
nsString mHost;
nsString mPort;
nsString mPath;
+ mutable bool mGeneratedFromSelfKeyword;
mutable bool mWithinFrameAncstorsDir;
};