Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit d06decc

Browse files
committed
Fix WebFTP : try getting credentials from url.
1 parent f2ede00 commit d06decc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/src/plugins/access.ftp/FtpAccessWrapper.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,12 @@ protected function parseUrl($url, $forceLogin = false)
588588
$this->user = $credentials["user"];
589589
$this->password = $credentials["password"];
590590
if ($this->user=="") {
591-
throw new PydioException("Cannot find user/pass for FTP access!");
591+
if (isSet($urlParts["user"]) && isset($urlParts["pass"])) {
592+
$this->user = rawurldecode($urlParts["user"]);
593+
$this->password = rawurldecode($urlParts["pass"]);
594+
}else{
595+
throw new PydioException("Cannot find user/pass for FTP access!");
596+
}
592597
}
593598
if ($repository->getContextOption($node->getContext(), "DYNAMIC_FTP") == "TRUE" && isSet($_SESSION["AJXP_DYNAMIC_FTP_DATA"])) {
594599
$data = $_SESSION["AJXP_DYNAMIC_FTP_DATA"];

0 commit comments

Comments
 (0)