(bug 10154) Don't allow user to specify days beyond $wgRCMaxAge
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 6 May 2011 15:45:13 +0000 (15:45 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 6 May 2011 15:45:13 +0000 (15:45 +0000)
RELEASE-NOTES
includes/specials/SpecialRecentchanges.php

index 43881c6..1b5474f 100644 (file)
@@ -15,6 +15,7 @@ production.
 === New features in 1.19 ===
 
 === Bug fixes in 1.19 ===
+* (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge.
 
 === API changes in 1.19 ===
 
index a9e1cda..9677252 100644 (file)
@@ -68,10 +68,11 @@ class SpecialRecentChanges extends IncludableSpecialPage {
         * @return FormOptions
         */
        public function setup( $parameters ) {
-               global $wgRequest;
+               global $wgRequest, $wgRCMaxAge;
 
                $opts = $this->getDefaultOptions();
                $opts->fetchValuesFromRequest( $wgRequest );
+               $opts->validateIntBounds( 'days', 1, $wgRCMaxAge / ( 3600 * 24 ) );
 
                // Give precedence to subpage syntax
                if( $parameters !== null ) {