r111239 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r111238
|
r111239
|
r111240
>
Date:
15:13, 11 February 2012
Author:
reedy
Status:
ok (
Comments
)
Tags:
Comment:
Followup
r11120
, wfParseUrl() can return false, if it does, the host isn't going to be valid
Modified paths:
/trunk/phase3/includes/upload/UploadFromUrl.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/upload/UploadFromUrl.php
—
—
@@ -47,8 +47,11 @@
48
48
if ( !count( $wgCopyUploadsDomains ) ) {
49
49
return true;
50
50
}
51
+ $parsedUrl = wfParseUrl( $url );
52
+ if ( !$parsedUrl ) {
53
+ return false;
54
+ }
51
55
$valid = false;
52
- $parsedUrl = wfParseUrl( $url );
53
56
foreach( $wgCopyUploadsDomains as $domain ) {
54
57
if ( $parsedUrl['host'] === $domain ) {
55
58
$valid = true;
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r111120
* (
bug 32341
) Add upload by URL domain limitation....
reedy
23:22, 9 February 2012
Comments
#
Comment by
Reedy
(
talk
|
contribs
)
15:15, 11 February 2012
r111120
rather
Status & tagging log
17:37, 11 February 2012
Aaron Schulz
(
talk
|
contribs
)
changed the
status
of r111239
[
removed:
new
added:
ok]