r106681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106680‎ | r106681 | r106682 >
Date:20:09, 19 December 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: MFT r106679
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/ClickTracking (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/ClickTracking/ApiClickTracking.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/ClickTracking/ApiClickTracking.php
@@ -61,21 +61,14 @@
6262 // For links that go off the page, redirect the user
6363 // FIXME: The API should have a proper infrastructure for this
6464 if ( !is_null( $params['redirectto'] ) ) {
65 - // Validate the redirectto parameter
66 - // Must be a local URL, may not be protocol-relative
67 - // This validation rule is the same as the one in ClickTracking.js
6865 $href = $params['redirectto'];
69 - if ( strlen( $href ) > 0 && $href[0] == '/' && ( strlen( $href ) == 1 || $href[1] != '/' ) ) {
70 - global $wgOut;
71 - $wgOut->redirect( $params['redirectto'] );
72 - $wgOut->output();
 66+ global $wgOut;
 67+ $wgOut->redirect( $params['redirectto'] );
 68+ $wgOut->output();
7369
74 - // Prevent any further output
75 - $wgOut->disable();
76 - $this->getMain()->getPrinter()->disable();
77 - } else {
78 - $this->dieUsage( 'The URL to redirect to must be domain-relative, i.e. start with a /', 'badurl' );
79 - }
 70+ // Prevent any further output
 71+ $wgOut->disable();
 72+ $this->getMain()->getPrinter()->disable();
8073 }
8174 }
8275
Property changes on: branches/wmf/1.18wmf1/extensions/ClickTracking
___________________________________________________________________
Added: svn:mergeinfo
8376 Merged /branches/new-installer/phase3/extensions/ClickTracking:r43664-66004
8477 Merged /branches/REL1_15/phase3/extensions/ClickTracking:r51646
8578 Merged /branches/REL1_18/extensions/ClickTracking:r101758,103190
8679 Merged /branches/REL1_17/phase3/extensions/ClickTracking:r81445,81448
8780 Merged /trunk/extensions/ClickTracking:r99592,99653,100092,100419,100686,100692,100699,103669,104337,104736,104863,106679
8881 Merged /branches/sqlite/extensions/ClickTracking:r58211-58321
8982 Merged /trunk/phase3/extensions/ClickTracking:r92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93520,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,98578,98598,98656

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106679Remove server-side "validation" of redirect URLs, not needed and getting in t...catrope20:04, 19 December 2011

Status & tagging log