[Aminet-commit] r144 - trunk/bin

aminet-discuss at aminet.net aminet-discuss at aminet.net
Sun Nov 16 20:49:45 CET 2008


Author: mendoza
Date: 2008-11-16 11:49:45 -0800 (Sun, 16 Nov 2008)
New Revision: 144

Modified:
   trunk/bin/admin.php
Log:
ensure directories with apostrof in the name are instereted into tree table

Modified: trunk/bin/admin.php
===================================================================
--- trunk/bin/admin.php	2008-11-16 19:48:40 UTC (rev 143)
+++ trunk/bin/admin.php	2008-11-16 19:49:45 UTC (rev 144)
@@ -185,8 +185,8 @@
 	while($line = fgets($tree,1024)) {
 	  if (preg_match("/^[^|]/",$line) && !preg_match("/^\s+$/",$line)) { // All lines that aren't comments
 	    if (preg_match("/^(\S+)\s+(.*)$/",$line,$matches)) {
-	      $tree_path = $matches[1];
-	      $tree_desc = $matches[2];
+	      $tree_path = mysql_real_escape_string($matches[1]);
+	      $tree_desc = mysql_real_escape_string($matches[2]);
 	      sql_query("REPLACE INTO tree (tree_path,tree_desc) VALUES ('$tree_path','$tree_desc')");
 	      report("($tree_path,$tree_desc)\n");
 	    } else {




More information about the Aminet-commit mailing list