From: Chad Horohoe Date: Fri, 6 May 2011 15:45:13 +0000 (+0000) Subject: (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge X-Git-Tag: 1.31.0-rc.0~30379 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=a0e2fc99c1283a2b06adc8f8e7d7997c6025fbbd;p=lhc%2Fweb%2Fwiklou.git (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 43881c68a2..1b5474ffa9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index a9e1cda7d1..9677252c71 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -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 ) {