Kaynağa Gözat

xss protection

Philip Wittamore 9 ay önce
ebeveyn
işleme
2a2a43f3ee
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      blog/search.php

+ 1 - 1
blog/search.php

@@ -1,7 +1,7 @@
 <?php
 $string = "";
 if (isset($_POST["s"])) {
-    $string = $_POST["s"];
+    $string = htmlspecialchars($_POST["s"]);
 }
 ?>
 <!doctype html>