filestash
filestash copied to clipboard
[bug] SMB host variable BUG
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()
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
Looks like this got fixed recently... https://github.com/mickael-kerjean/filestash/commit/d898231918727a4d2e4de3f0ff2b0737915b577a
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.
Also encountered this problem - as a workaround, I added smb://
to the hostname prefix as mentioned by @serboupal - thanks! :)