mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Disallow invalid trusted type policy names (#38886)
Actual fix is in the CSP crate. Part of #36258 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
908c392219
commit
6205c07114
4 changed files with 18 additions and 29 deletions
|
@ -51,8 +51,8 @@ pub(crate) trait CspReporting {
|
|||
fn is_trusted_type_policy_creation_allowed(
|
||||
&self,
|
||||
global: &GlobalScope,
|
||||
policy_name: String,
|
||||
created_policy_names: Vec<String>,
|
||||
policy_name: &str,
|
||||
created_policy_names: &[&str],
|
||||
) -> bool;
|
||||
fn does_sink_type_require_trusted_types(
|
||||
&self,
|
||||
|
@ -173,8 +173,8 @@ impl CspReporting for Option<CspList> {
|
|||
fn is_trusted_type_policy_creation_allowed(
|
||||
&self,
|
||||
global: &GlobalScope,
|
||||
policy_name: String,
|
||||
created_policy_names: Vec<String>,
|
||||
policy_name: &str,
|
||||
created_policy_names: &[&str],
|
||||
) -> bool {
|
||||
let Some(csp_list) = self else {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue