Bonjour,

J'ai intégré ce bout de code sur un site mais visiblement il présente des failles de sécurité....

Quelqu'un pourrait-il m'en dire plus svp ? (risques encourus, quel faille, etc...)

Merci

page download.php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
<?php
 
 header("Content-type: application/pdf");
 header("Content-Disposition: attachment; filename=$_GET[pdf]");
 readfile($_GET['pdf']);
 
?>
Page HTML :

Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
<html>
<head>
</head>
<body>
<a href="download.php?pdf=test.pdf">télécharger test.pdf</a>
</body>
</html>


Merci