Index: branches/wmf/1.18wmf1/extensions/ClickTracking/ApiClickTracking.php |
— | — | @@ -61,21 +61,14 @@ |
62 | 62 | // For links that go off the page, redirect the user |
63 | 63 | // FIXME: The API should have a proper infrastructure for this |
64 | 64 | 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 |
68 | 65 | $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(); |
73 | 69 | |
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(); |
80 | 73 | } |
81 | 74 | } |
82 | 75 | |
Property changes on: branches/wmf/1.18wmf1/extensions/ClickTracking |
___________________________________________________________________ |
Added: svn:mergeinfo |
83 | 76 | Merged /branches/new-installer/phase3/extensions/ClickTracking:r43664-66004 |
84 | 77 | Merged /branches/REL1_15/phase3/extensions/ClickTracking:r51646 |
85 | 78 | Merged /branches/REL1_18/extensions/ClickTracking:r101758,103190 |
86 | 79 | Merged /branches/REL1_17/phase3/extensions/ClickTracking:r81445,81448 |
87 | 80 | Merged /trunk/extensions/ClickTracking:r99592,99653,100092,100419,100686,100692,100699,103669,104337,104736,104863,106679 |
88 | 81 | Merged /branches/sqlite/extensions/ClickTracking:r58211-58321 |
89 | 82 | 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 |