Browse Source

防止sql注入

visuddhinanda 4 years ago
parent
commit
9a2535a830
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/studio/pc_get_word_num.php

+ 3 - 3
app/studio/pc_get_word_num.php

@@ -3,9 +3,9 @@
 require_once "../path.php";
 require_once "../public/_pdo.php";
 
-$get_book = $_GET["book"];
-$get_par_begin = $_GET["begin"];
-$get_par_end = $_GET["end"];
+$get_book = (int)$_GET["book"];
+$get_par_begin = (int)$_GET["begin"];
+$get_par_end = (int)$_GET["end"];
 
 $db_file = _DIR_PALICANON_TEMPLET_ . "/p" . $get_book . "_tpl.db3";