r109564 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109563‎ | r109564 | r109565 >
Date:20:26, 19 January 2012
Author:reedy
Status:reverted
Tags:
Comment:
Followup r109562

Don't use such a naieve host check
Modified paths:
  • /trunk/phase3/includes/upload/UploadFromUrl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadFromUrl.php
@@ -49,8 +49,9 @@
5050 return true;
5151 }
5252 $valid = false;
 53+ $parsedUrl = wfParseUrl( $url );
5354 foreach( $wgCopyUploadsDomains as $domain ) {
54 - if ( strpos( $url, $domain ) !== false ) {
 55+ if ( $parsedUrl['host'] === $domain ) {
5556 $valid = true;
5657 break;
5758 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r109741Revert feature out of r109562, r109564, r109570...reedy17:33, 22 January 2012
r111120* (bug 32341) Add upload by URL domain limitation....reedy23:22, 9 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109562* (bug 32341) Add upload by URL domain limitation.reedy19:16, 19 January 2012

Status & tagging log