dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix (
[lhc/web/wiklou.git]
/
includes
/
HttpFunctions.php
diff --git
a/includes/HttpFunctions.php
b/includes/HttpFunctions.php
index
1eb8ca5
..
f9ee14b
100644
(file)
--- a/
includes/HttpFunctions.php
+++ b/
includes/HttpFunctions.php
@@
-114,7
+114,7
@@
class Http {
* @return bool
*/
public static function isLocalURL( $url ) {
* @return bool
*/
public static function isLocalURL( $url ) {
- global $wgCommandLineMode, $wgConf;
+ global $wgCommandLineMode, $wg
LocalVirtualHosts, $wg
Conf;
if ( $wgCommandLineMode ) {
return false;
if ( $wgCommandLineMode ) {
return false;
@@
-126,7
+126,7
@@
class Http {
$host = $matches[1];
// Split up dotwise
$domainParts = explode( '.', $host );
$host = $matches[1];
// Split up dotwise
$domainParts = explode( '.', $host );
- // Check if this domain or any superdomain is listed
in $wgConf
as a local virtual host
+ // Check if this domain or any superdomain is listed as a local virtual host
$domainParts = array_reverse( $domainParts );
$domain = '';
$domainParts = array_reverse( $domainParts );
$domain = '';
@@
-139,7
+139,9
@@
class Http {
$domain = $domainPart . '.' . $domain;
}
$domain = $domainPart . '.' . $domain;
}
- if ( $wgConf->isLocalVHost( $domain ) ) {
+ if ( in_array( $domain, $wgLocalVirtualHosts )
+ || $wgConf->isLocalVHost( $domain )
+ ) {
return true;
}
}
return true;
}
}
@@
-809,7
+811,8
@@
class CurlHttpRequest extends MWHttpRequest {
return false;
}
return false;
}
- if ( !defined( 'CURLOPT_REDIR_PROTOCOLS' ) ) {
+ $curlVersionInfo = curl_version();
+ if ( $curlVersionInfo['version_number'] < 0x071304 ) {
wfDebug( "Cannot follow redirects with libcurl < 7.19.4 due to CVE-2009-0037\n" );
return false;
}
wfDebug( "Cannot follow redirects with libcurl < 7.19.4 due to CVE-2009-0037\n" );
return false;
}