Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

test(csp): cover encoded commas across policy parsing and URL matching

ldm0d89d17a56811
diff --git a/moli-renderer-v8/src/content_security_policy.rs b/moli-renderer-v8/src/content_security_policy.rs
index c2c32f2ab..0b6bcb7d8 100644
--- a/moli-renderer-v8/src/content_security_policy.rs
+++ b/moli-renderer-v8/src/content_security_policy.rs
@@ -2224,6 +2224,11 @@ mod tests {
"https://cdn.test/foo%2cbar",
true,
),
+ (
+ "img-src https://cdn.test/foo%2cbar",
+ "https://cdn.test/foo,bar",
+ true,
+ ),
(
", , img-src * , , img-src 'none', ,",
"https://cdn.test/asset",