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

Commit d57bd98

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 1b3a15e + 28645a1 commit d57bd98

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

core/src/plugins/auth.smb/class.smbAuthDriver.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function logoutCallback($actionName, $httpVars, $fileVars)
5656

5757
public function checkPassword($login, $pass, $seed)
5858
{
59-
require_once(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/access.smb/smb.php");
59+
require_once(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/access.smb/smb.php");
6060

6161
$_SESSION["AJXP_SESSION_REMOTE_PASS"] = $pass;
6262
$repoId = $this->options["REPOSITORY_ID"];
@@ -66,7 +66,15 @@ public function checkPassword($login, $pass, $seed)
6666
$basePath = $repoObject->getOption("PATH", true);
6767
$basePath = str_replace("AJXP_USER", $login, $basePath);
6868
$host = $repoObject->getOption("HOST");
69-
$url = "smb://$login:$pass@".$host."/".$basePath."/";
69+
$domain = $repoObject->getOption("DOMAIN", true);
70+
$smbPath = $repoObject->getOption("PATH", true);
71+
72+
if(!empty($domain)){
73+
$login = $domain.$login;
74+
}
75+
$strTmp = "$login:$pass@".$host."/".$basePath."/".$smbPath."/";
76+
$strTmp = str_replace("//", "/",$strTmp);
77+
$url = "smb://".$strTmp;
7078
try {
7179
if (!is_dir($url)) {
7280
$this->logDebug("SMB Login failure");

core/src/plugins/auth.smb/manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</resources>
77
</client_settings>
88
<server_settings>
9-
<param name="REPOSITORY_ID" type="string" label="CONF_MESSAGE[Repository]" description="CONF_MESSAGE[Id of the repository to use for testing connexion]" mandatory="true"/>
9+
<param name="REPOSITORY_ID" type="select" choices="json_list:list_all_repositories_json" label="CONF_MESSAGE[Workspace]" description="CONF_MESSAGE[ID of the workspace used to validate credentials]" mandatory="true"/>
1010
<param name="ADMIN_USER" type="string" label="CONF_MESSAGE[Admin user]" description="CONF_MESSAGE[The ID of an existing admin for Pydio (using conf.serial)]" mandatory="true"/>
1111
</server_settings>
1212
<class_definition filename="plugins/auth.smb/class.smbAuthDriver.php" classname="smbAuthDriver"/>

0 commit comments

Comments
 (0)