Moritz Schmidt %!s(int64=10) %!d(string=hai) anos
pai
achega
065d25c702
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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']);