1
0
Fork 0

Fix code to use hostname only, refs #3026

pull/2995/merge
Jordi Boggiano 2014-06-05 11:14:29 +02:00
parent 89ec322929
commit 08e34858d6
2 changed files with 5 additions and 4 deletions

View File

@ -289,9 +289,10 @@ class Svn
$authConfig = $this->config->get('http-basic'); $authConfig = $this->config->get('http-basic');
if (array_key_exists($this->url, $authConfig)) { $host = parse_url($this->url, PHP_URL_HOST);
$this->credentials['username'] = $authConfig[$this->url]['username']; if (isset($authConfig[$host])) {
$this->credentials['password'] = $authConfig[$this->url]['password']; $this->credentials['username'] = $authConfig[$host]['username'];
$this->credentials['password'] = $authConfig[$host]['password'];
return $this->hasAuth = true; return $this->hasAuth = true;
} }

View File

@ -60,7 +60,7 @@ class SvnTest extends \PHPUnit_Framework_TestCase
$config->merge(array( $config->merge(array(
'config' => array( 'config' => array(
'http-basic' => array( 'http-basic' => array(
$url => array('username' => 'foo', 'password' => 'bar') 'svn.apache.org' => array('username' => 'foo', 'password' => 'bar')
) )
) )
)); ));