Moritz Schmidt il y a 10 ans
Parent
commit
065d25c702
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      index.php

+ 4 - 0
index.php

@@ -24,6 +24,10 @@
             }
         }
     } else {
+        $_GET['path'] = str_replace('/..', '', $_GET['path']);
+        $_GET['path'] = str_replace('../', '', $_GET['path']);
+        $_GET['path'] = str_replace('..', '', $_GET['path']);
+
         echo "<h2>" . $_GET['path'] . "</h2>";
         if(is_dir($_GET['path'])) {
             $list = scandir($_GET['path']);