http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96564

Revision: 96564
Author:   catrope
Date:     2011-09-08 13:53:18 +0000 (Thu, 08 Sep 2011)
Log Message:
-----------
Use wfParseUrl() instead of parse_url() in MWHttpRequest::__construct(), and 
check the return value for false

Modified Paths:
--------------
    trunk/phase3/includes/HttpFunctions.php

Modified: trunk/phase3/includes/HttpFunctions.php
===================================================================
--- trunk/phase3/includes/HttpFunctions.php     2011-09-08 13:49:48 UTC (rev 
96563)
+++ trunk/phase3/includes/HttpFunctions.php     2011-09-08 13:53:18 UTC (rev 
96564)
@@ -184,9 +184,9 @@
                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


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to