зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1219931 - CSP: Don't allow removing a policy (r=sicking)
This commit is contained in:
Родитель
50588ca7c1
Коммит
1873ead519
|
@ -21,7 +21,7 @@ interface nsIURI;
|
|||
|
||||
typedef unsigned short CSPDirective;
|
||||
|
||||
[scriptable, builtinclass, uuid(b756d344-ee2f-44d0-825e-ea4febd0af14)]
|
||||
[scriptable, builtinclass, uuid(b9a029c3-9484-4bf7-826d-0c6b545790bc)]
|
||||
interface nsIContentSecurityPolicy : nsISerializable
|
||||
{
|
||||
/**
|
||||
|
@ -87,12 +87,6 @@ interface nsIContentSecurityPolicy : nsISerializable
|
|||
*/
|
||||
bool getReferrerPolicy(out unsigned long policy);
|
||||
|
||||
/**
|
||||
* Remove a policy associated with this CSP context.
|
||||
* @throws NS_ERROR_FAILURE if the index is out of bounds or invalid.
|
||||
*/
|
||||
void removePolicy(in unsigned long index);
|
||||
|
||||
/**
|
||||
* Parse and install a CSP policy.
|
||||
* @param aPolicy
|
||||
|
|
|
@ -340,18 +340,6 @@ nsCSPContext::GetReferrerPolicy(uint32_t* outPolicy, bool* outIsSet)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCSPContext::RemovePolicy(uint32_t aIndex)
|
||||
{
|
||||
if (aIndex >= mPolicies.Length()) {
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
mPolicies.RemoveElementAt(aIndex);
|
||||
// reset cache since effective policy changes
|
||||
mShouldLoadCache.Clear();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCSPContext::AppendPolicy(const nsAString& aPolicyString,
|
||||
bool aReportOnly)
|
||||
|
|
Загрузка…
Ссылка в новой задаче