(bug 14526) Unescaped SQL in list=backlinks
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 13 Jun 2008 13:22:50 +0000 (13:22 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 13 Jun 2008 13:22:50 +0000 (13:22 +0000)
RELEASE-NOTES
includes/api/ApiQueryBacklinks.php

index d621d0d..ae413a5 100644 (file)
@@ -444,6 +444,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added action=emailuser to send an email to a user
 * (bug 14471) Use HTMLTidy and generate limit report in action=parse
 * (bug 14459) Added prependtext and appendtext parameters to action=edit
+* (bug 14526) Unescaped SQL in list=backlinks
 
 === Languages updated in 1.13 ===
 
index 0ae3681..6289ce6 100644 (file)
@@ -141,7 +141,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                $titleWhere = '';
                foreach($this->redirTitles as $t)
                        $titleWhere .= ($titleWhere != '' ? " OR " : '') .
-                                       "({$this->bl_title} = '{$t->getDBKey()}'" .
+                                       "({$this->bl_title} = ".$db->addQuotes($t->getDBKey()).
                                        ($this->hasNS ? " AND {$this->bl_ns} = '{$t->getNamespace()}'" : "") .
                                        ")";
                $this->addWhere($titleWhere);