Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1344,7 +1344,6 @@ |
1345 | 1345 | 'upload-too-many-redirects', |
1346 | 1346 | 'upload-unknown-size', |
1347 | 1347 | 'upload-http-error', |
1348 | | - 'upload-copy-upload-invalid-domain', |
1349 | 1348 | ), |
1350 | 1349 | |
1351 | 1350 | 'filebackend-errors' => array( |
Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -123,7 +123,6 @@ |
124 | 124 | * (bug 29309) Allow CSS class per tooltip (tipsy). |
125 | 125 | * (bug 33565) Add accesskey/tooltip to submit buttons on Special:EditWatchlist. |
126 | 126 | * (bug 17959) Inline rendering/thumbnailing for Gimp XCF images. |
127 | | -* (bug 32341) Add upload by URL domain limitation. |
128 | 127 | |
129 | 128 | === Bug fixes in 1.19 === |
130 | 129 | * $wgUploadNavigationUrl should be used for file redlinks if. |
Index: trunk/phase3/includes/upload/UploadFromUrl.php |
— | — | @@ -38,28 +38,6 @@ |
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | | - * Checks whether the URL is for an allowed host |
43 | | - * |
44 | | - * @param $url string |
45 | | - * @return bool |
46 | | - */ |
47 | | - public static function isAllowedHost( $url ) { |
48 | | - global $wgCopyUploadsDomains; |
49 | | - if ( !count( $wgCopyUploadsDomains ) ) { |
50 | | - return true; |
51 | | - } |
52 | | - $valid = false; |
53 | | - $parsedUrl = wfParseUrl( $url ); |
54 | | - foreach( $wgCopyUploadsDomains as $domain ) { |
55 | | - if ( $parsedUrl['host'] === $domain ) { |
56 | | - $valid = true; |
57 | | - break; |
58 | | - } |
59 | | - } |
60 | | - return $valid; |
61 | | - } |
62 | | - |
63 | | - /** |
64 | 42 | * Entry point for API upload |
65 | 43 | * |
66 | 44 | * @param $name string |
— | — | @@ -124,9 +102,6 @@ |
125 | 103 | return Status::newFatal( 'http-invalid-url' ); |
126 | 104 | } |
127 | 105 | |
128 | | - if( !self::isAllowedHost( $this->mUrl ) ) { |
129 | | - return Status::newFatal( 'upload-copy-upload-invalid-domain' ); |
130 | | - } |
131 | 106 | if ( !$this->mAsync ) { |
132 | 107 | return $this->reallyFetchFile(); |
133 | 108 | } |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -1231,7 +1231,6 @@ |
1232 | 1232 | 'nouploadmodule' => array( 'code' => 'nouploadmodule', 'info' => 'No upload module set' ), |
1233 | 1233 | 'uploaddisabled' => array( 'code' => 'uploaddisabled', 'info' => 'Uploads are not enabled. Make sure $wgEnableUploads is set to true in LocalSettings.php and the PHP ini setting file_uploads is true' ), |
1234 | 1234 | 'copyuploaddisabled' => array( 'code' => 'copyuploaddisabled', 'info' => 'Uploads by URL is not enabled. Make sure $wgAllowCopyUploads is set to true in LocalSettings.php.' ), |
1235 | | - 'copyuploadbaddomain' => array( 'code' => 'copyuploadbaddomain', 'info' => 'Uploads by URL are not allowed from this domain.' ), |
1236 | 1235 | |
1237 | 1236 | 'filename-tooshort' => array( 'code' => 'filename-tooshort', 'info' => 'The filename is too short' ), |
1238 | 1237 | 'filename-toolong' => array( 'code' => 'filename-toolong', 'info' => 'The filename is too long' ), |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -318,10 +318,6 @@ |
319 | 319 | $this->dieUsageMsg( 'copyuploaddisabled' ); |
320 | 320 | } |
321 | 321 | |
322 | | - if ( !UploadFromUrl::isAllowedHost( $this->mParams['url'] ) ) { |
323 | | - $this->dieUsageMsg( 'copyuploadbaddomain' ); |
324 | | - } |
325 | | - |
326 | 322 | $async = false; |
327 | 323 | if ( $this->mParams['asyncdownload'] ) { |
328 | 324 | $this->checkAsyncDownloadEnabled(); |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -453,10 +453,6 @@ |
454 | 454 | * This feature is experimental and broken as of r81612. |
455 | 455 | */ |
456 | 456 | $wgAllowAsyncCopyUploads = false; |
457 | | -/** |
458 | | - * A list of domains copy uploads can come from |
459 | | - */ |
460 | | -$wgCopyUploadsDomains = array(); |
461 | 457 | |
462 | 458 | /** |
463 | 459 | * Max size for uploads, in bytes. If not set to an array, applies to all |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2235,7 +2235,6 @@ |
2236 | 2236 | 'upload-too-many-redirects' => 'The URL contained too many redirects', |
2237 | 2237 | 'upload-unknown-size' => 'Unknown size', |
2238 | 2238 | 'upload-http-error' => 'An HTTP error occured: $1', |
2239 | | -'upload-copy-upload-invalid-domain' => 'Copy uploads are not available from this domain.', |
2240 | 2239 | |
2241 | 2240 | # File backend |
2242 | 2241 | 'backend-fail-stream' => 'Could not stream file $1.', |