Sfoglia il codice sorgente

Add CSP to favicons (#7471)

E.g. for the case of SVGs
Alexandre Alapetite 1 anno fa
parent
commit
426e3054c2
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      p/f.php

+ 1 - 0
p/f.php

@@ -48,6 +48,7 @@ if ($ico_mtime == false || $ico_mtime < $txt_mtime || ($ico_mtime < time() - (mt
 	}
 	}
 }
 }
 
 
+header("Content-Security-Policy: default-src 'none'; img-src 'self'; style-src 'self';");
 if (!httpConditional($ico_mtime, mt_rand(14, 21) * 86400, 2)) {
 if (!httpConditional($ico_mtime, mt_rand(14, 21) * 86400, 2)) {
 	$ico_content_type = contentType($ico);
 	$ico_content_type = contentType($ico);
 	header('Content-Type: ' . $ico_content_type);
 	header('Content-Type: ' . $ico_content_type);