Ensure offset provided to Special:Undelete is numerical (to prevent SQL injection).
authorDaniel Cannon <amidaniel@users.mediawiki.org>
Tue, 4 Dec 2007 22:44:34 +0000 (22:44 +0000)
committerDaniel Cannon <amidaniel@users.mediawiki.org>
Tue, 4 Dec 2007 22:44:34 +0000 (22:44 +0000)
includes/SpecialUndelete.php

index 2f88bda..2175b66 100644 (file)
@@ -100,7 +100,7 @@ class PageArchive {
        function listRevisions( $startTime, $limit ) {
                $whereClause = array( 'ar_namespace' => $this->title->getNamespace(),
                        'ar_title' => $this->title->getDBkey() );
-               if ( $startTime )
+               if ( $startTime && is_numeric($startTime) )
                        $whereClause[] = "ar_timestamp < $startTime";
        
                $dbr = wfGetDB( DB_SLAVE );