Fix code to use hostname only, refs #3026
parent
89ec322929
commit
08e34858d6
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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')
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in New Issue