Permalink
Browse files

Fix ftp password contents slash /

  • Loading branch information...
1 parent 5c65dbd commit 66bee100c4125d6ef1a4ef02c968b87f8d0fbb2c @c12simple c12simple committed Sep 22, 2016
Showing with 8 additions and 1 deletion.
  1. +8 −1 core/src/plugins/access.ftp/FtpAccessWrapper.php
@@ -661,7 +661,14 @@ protected function buildRealUrl($url)
$parts = UrlUtils::safeParseUrl($url);
}
$serverPath = InputFilter::securePath("/$this->path/" . $parts["path"]);
- return "ftp".($this->secure?"s":"")."://$this->user:$this->password@$this->host:$this->port".$serverPath;
+ if($this->secure){
+ $protocol = 'ftps';
+ }
+ else{
+ $protocol = 'ftp';
+ }
+ $url = $protocol.'://'.urlencode($this->user).':'.urlencode($this->password).'@'.$this->host.':'.$this->port.$serverPath;
+ return $url;
}
/**

0 comments on commit 66bee10

Please sign in to comment.