Permalink
Browse files

Fix WebFTP : try getting credentials from url.

  • Loading branch information...
1 parent f2ede00 commit d06decc8b800bdc4cc2024faa5048efed75027a2 @cdujeu cdujeu committed Oct 10, 2016
Showing with 6 additions and 1 deletion.
  1. +6 −1 core/src/plugins/access.ftp/FtpAccessWrapper.php
@@ -588,7 +588,12 @@ protected function parseUrl($url, $forceLogin = false)
$this->user = $credentials["user"];
$this->password = $credentials["password"];
if ($this->user=="") {
- throw new PydioException("Cannot find user/pass for FTP access!");
+ if (isSet($urlParts["user"]) && isset($urlParts["pass"])) {
+ $this->user = rawurldecode($urlParts["user"]);
+ $this->password = rawurldecode($urlParts["pass"]);
+ }else{
+ throw new PydioException("Cannot find user/pass for FTP access!");
+ }
}
if ($repository->getContextOption($node->getContext(), "DYNAMIC_FTP") == "TRUE" && isSet($_SESSION["AJXP_DYNAMIC_FTP_DATA"])) {
$data = $_SESSION["AJXP_DYNAMIC_FTP_DATA"];

0 comments on commit d06decc

Please sign in to comment.