From d379979d1aebe91cfb529ec3472084319f08c777 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Thu, 3 Nov 2011 14:04:01 +0000 Subject: [PATCH] use isValidURI for redirect check --- includes/HttpFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 2ec7ea19f2..6968c612df 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -855,7 +855,7 @@ class PhpHttpRequest extends MWHttpRequest { # Check security of URL $url = $this->getResponseHeader( "Location" ); - if ( substr( $url, 0, 7 ) !== 'http://' ) { + if ( !HTTP::isValidURI( $url ) ) { wfDebug( __METHOD__ . ": insecure redirection\n" ); break; } -- 2.20.1