From: Roan Kattouw Date: Thu, 8 Sep 2011 13:53:18 +0000 (+0000) Subject: Use wfParseUrl() instead of parse_url() in MWHttpRequest::__construct(), and check... X-Git-Tag: 1.31.0-rc.0~27795 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=fe82ae0e2734a7e37305cc3f5b36b1bd220f7a3f;p=lhc%2Fweb%2Fwiklou.git Use wfParseUrl() instead of parse_url() in MWHttpRequest::__construct(), and check the return value for false --- diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 20186f5105..aa69ae71e5 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -184,9 +184,9 @@ class MWHttpRequest { global $wgHTTPTimeout; $this->url = wfExpandUrl( $url, PROTO_HTTP ); - $this->parsedUrl = parse_url( $this->url ); + $this->parsedUrl = wfParseUrl( $this->url ); - if ( !Http::isValidURI( $this->url ) ) { + if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) { $this->status = Status::newFatal( 'http-invalid-url' ); } else { $this->status = Status::newGood( 100 ); // continue