mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
This ought to fix a security flaw.
This commit is contained in:
1 parent
4a3bad6b91
commit
a4cbfcd99a
1 file changed
+2
-2
+2
-2
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user