mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 14:57:32 +09:00
[DOM security] Be more explicit about CSP checks and reports.
This commit is contained in:
parent
ef3685dc5d
commit
95120acbb2
5 changed files with 70 additions and 10 deletions
|
|
@ -252,9 +252,6 @@ interface nsIContentSecurityPolicy : nsISerializable
|
|||
/**
|
||||
* Checks if a specific directive permits loading of a URI.
|
||||
*
|
||||
* NOTE: Calls to this may trigger violation reports when queried, so the
|
||||
* return value should not be cached.
|
||||
*
|
||||
* @param aURI
|
||||
* The URI about to be loaded or used.
|
||||
* @param aDir
|
||||
|
|
@ -266,11 +263,17 @@ interface nsIContentSecurityPolicy : nsISerializable
|
|||
* "false" allows CSP to fall back to default-src. This function
|
||||
* behaves the same for both values of canUseDefault when querying
|
||||
* directives that don't fall-back.
|
||||
* @param aSendViolationReports
|
||||
* If `true` and the uri is not allowed then trigger violation reports.
|
||||
* This should be `false` for caching or preloads.
|
||||
* @return
|
||||
* Whether or not the provided URI is allowed by CSP under the given
|
||||
* directive. (block the pending operation if false).
|
||||
*/
|
||||
boolean permits(in nsIURI aURI, in CSPDirective aDir, in boolean aSpecific);
|
||||
boolean permits(in nsIURI aURI,
|
||||
in CSPDirective aDir,
|
||||
in boolean aSpecific,
|
||||
in boolean aSendViolationReports);
|
||||
|
||||
/**
|
||||
* Delegate method called by the service when sub-elements of the protected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue