Merge pull request #1662 from iroli1/master
Fix mangling of username/password containing % char
This commit is contained in:
@@ -52,7 +52,8 @@ class OC_User_FTP extends \OCA\user_external\Base{
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$url = sprintf('%s://%s:%s@%s/', $this->protocol, $uid, $password, $this->host);
|
// opendir handles the as %-encoded string, but this is not true for usernames and passwords, encode them before passing them
|
||||||
|
$url = sprintf('%s://%s:%s@%s/', $this->protocol, urlencode($uid), urlencode($password), $this->host);
|
||||||
$result=@opendir($url);
|
$result=@opendir($url);
|
||||||
if(is_resource($result)) {
|
if(is_resource($result)) {
|
||||||
$this->storeUser($uid);
|
$this->storeUser($uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user