r89452 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89451‎ | r89452 | r89453 >
Date:02:59, 4 June 2011
Author:mah
Status:ok
Tags:
Comment:
follow up r89278 — remove FTP support.
Modified paths:
  • /trunk/phase3/includes/HttpFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HttpFunctions.php
@@ -126,14 +126,13 @@
127127 * and php support.
128128 *
129129 * @fixme this is wildly inaccurate and fails to actually check most stuff
130 - * @fixme do we actually intend to have FTP support here? Does it work consistently?
131130 *
132131 * @param $uri Mixed: URI to check for validity
133132 * @returns Boolean
134133 */
135134 public static function isValidURI( $uri ) {
136135 return preg_match(
137 - '/^(f|ht)tps?:\/\/[^\/\s]\S*$/D',
 136+ '/^https?:\/\/[^\/\s]\S*$/D',
138137 $uri
139138 );
140139 }
@@ -717,7 +716,6 @@
718717 }
719718
720719 if ( $this->parsedUrl['scheme'] != 'http' &&
721 - $this->parsedUrl['scheme'] != 'ftp' &&
722720 $this->parsedUrl['scheme'] != 'https' ) {
723721 $this->status->fatal( 'http-invalid-scheme', $this->parsedUrl['scheme'] );
724722 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r89812MFT r89278, r89452. Also had to grab r83360.demon02:56, 10 June 2011
r90192Followup to r89452, remove ftp test cases since Http::isValidUri() doesn't do...demon02:58, 16 June 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89278Fix Bug #29231: PhpHttpRequest doesn't support HTTPS...mah18:57, 1 June 2011

Status & tagging log