Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] SMB host variable BUG #693

Open
matoH12 opened this issue May 5, 2024 · 3 comments
Open

[bug] SMB host variable BUG #693

matoH12 opened this issue May 5, 2024 · 3 comments

Comments

@matoH12
Copy link

matoH12 commented May 5, 2024

Description of the bug

The authetification in SMB plugin no work. The host variable is not apply

Step by step instructions to reproduce the bug

Create SAMBA backend and try login. In debug log you can not see the host variale correcty. Im see in host error

Im find in code this:

if u, err := url.Parse(params["host"]); err == nil {
 		**params["host"] = u.Host**
 		if params["port"] == "" {
 			params["port"] = u.Port()
 		}
 		if params["share"] == "" {
 			params["share"] = strings.ReplaceAll(u.Path, "/", "")
 		}

where the "u.Host" dont have (). u.Host()

@serboupal
Copy link

u.Host is a string so no need for parentheses there. The function url.Parse expect a string with protocol. If you want to use samba, you need to specify smb://hostname as hostname. I thing this should be changed so it add automatically the protocol if is missing

@zeighy
Copy link

zeighy commented Jun 9, 2024

Looks like this got fixed recently... d898231

@Ownercz
Copy link

Ownercz commented Jun 9, 2024

Thanks for the workaround and dev for the fix. I just encountered this issue using latest docker image 14f176ae7f6e.
With full protocol specification in url it works allright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants