This ought to fix a security flaw.

This commit is contained in:
Vasco Lavos committed 2014-06-14 15:04:44 +01:00
1 parent 4a3bad6b91
commit a4cbfcd99a
1 file changed
+2 -2
+2 -2
View File
@@ -6,10 +6,10 @@
dl_mod($_GET['file']);
function dl_mod($mod) {
if(strlen($mod) > 0) {
if(strlen($mod) > 0 && file_exists("files/$mod") && strpos($mod, "/") !== false) {
increment_dl_counter($mod);
header("Location: files/$mod");
}
} else echo("Hm, doesn't seem like that file exists :( <br><a href='./'>Back</a>");
}
function increment_dl_counter($mod) {