mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 19:47:32 +09:00
CSP: connect-src 'self' should always include https: and wss: schemes
This commit is contained in:
parent
ee67abc801
commit
96886141e1
8 changed files with 168 additions and 11 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue