Added XSS prevention

This commit is contained in:
root 2008-11-23 05:08:59 +00:00
parent 6f397008ee
commit c5e711ba1f

View file

@ -38,7 +38,9 @@
{ {
header("Content-Type: application/x-x509-user-cert"); header("Content-Type: application/x-x509-user-cert");
header("Content-Length: ".strlen($cert)); header("Content-Length: ".strlen($cert));
header('Content-Disposition: inline; filename="'.$row['CN'].'.crt"'); $fname=sanitizeFilename($row['CN']);
if($fname=="") $fname="certificate";
header('Content-Disposition: inline; filename="'.$fname.'.crt"');
echo $cert; echo $cert;
exit; exit;
} else { } else {