r87545 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87544‎ | r87545 | r87546 >
Date:15:45, 6 May 2011
Author:demon
Status:reverted (Comments)
Tags:
Comment:
(bug 10154) Don't allow user to specify days beyond $wgRCMaxAge
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -68,10 +68,11 @@
6969 * @return FormOptions
7070 */
7171 public function setup( $parameters ) {
72 - global $wgRequest;
 72+ global $wgRequest, $wgRCMaxAge;
7373
7474 $opts = $this->getDefaultOptions();
7575 $opts->fetchValuesFromRequest( $wgRequest );
 76+ $opts->validateIntBounds( 'days', 1, $wgRCMaxAge / ( 3600 * 24 ) );
7677
7778 // Give precedence to subpage syntax
7879 if( $parameters !== null ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -15,6 +15,7 @@
1616 === New features in 1.19 ===
1717
1818 === Bug fixes in 1.19 ===
 19+* (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge.
1920
2021 === API changes in 1.19 ===
2122

Follow-up revisions

RevisionCommit summaryAuthorDate
r88004(bug 10154) Don't allow user to specify days beyond $wgRCMaxAgedemon16:21, 13 May 2011
r89307Self-revert r87545demon00:11, 2 June 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   17:57, 6 May 2011

This would seem to defeat the purpose of having $wgRCFilterByAge set to false -- larger day values in $wgRCLinkDays will be shown, but won't work.

If this is to be firmly enforced here, then either $wgRCFilterByAge should be removed and the filtering should always be performed, or it should only be enforced when $wgRCFilterByAge is true.

Status & tagging log