Fix SQL injection bug
authorJens Frank <jeluf@users.mediawiki.org>
Wed, 13 Oct 2004 21:30:18 +0000 (21:30 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Wed, 13 Oct 2004 21:30:18 +0000 (21:30 +0000)
includes/SpecialMaintenance.php

index 6f74bd5..3166c5a 100644 (file)
@@ -269,7 +269,7 @@ function wfSpecialMissingLanguageLinks() {
 
        $sql = "SELECT cur_title FROM $cur " .
          "WHERE cur_namespace=0 AND cur_is_redirect=0 " .
-         "AND cur_title NOT LIKE '%/%' AND cur_text NOT LIKE '%[[{$thelang}:%' " .
+         "AND cur_title NOT LIKE '%/%' AND cur_text NOT LIKE '%[[" . wfStrencode( $thelang ) . ":%' " .
          "LIMIT {$offset}, {$limit}";
 
        $res = $dbr->query( $sql, $fname );