Explorar el Código

Bug 50 - SQL injection exploit, resolved by checking for valid post id

mheitzenroder@gmail.com hace 16 años
padre
commit
2b04a0339c
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      index.php

+ 3 - 0
index.php Ver fichero

@@ -42,6 +42,9 @@
42 42
 
43 43
         if (isset($_GET["post"])) {
44 44
                 $id_post = $_GET["post"];
45
+                if (!is_numeric($id_post) && $id_post < 1 ){
46
+                	header("Location: index.php");
47
+                }
45 48
         } else {
46 49
                 if (isset($param_url[1]) && $param_url[1]=="post") {
47 50
                         $id_post = (isset($param_url[2])) ? ((is_numeric($param_url[2])) ? $param_url[2] : NULL) : NULL;