forked from TrueCloudLab/rclone
lib/http: Fix bad username check in single auth secret provider
This commit is contained in:
parent
1cb31e8cc7
commit
b1cb41f8da
1 changed files with 2 additions and 2 deletions
|
@ -88,8 +88,8 @@ func HtPasswdAuth(path, realm string) httplib.Middleware {
|
||||||
func SingleAuth(user, pass, realm string) httplib.Middleware {
|
func SingleAuth(user, pass, realm string) httplib.Middleware {
|
||||||
fs.Infof(nil, "Using --user %s --pass XXXX as authenticated user", user)
|
fs.Infof(nil, "Using --user %s --pass XXXX as authenticated user", user)
|
||||||
pass = string(auth.MD5Crypt([]byte(pass), []byte("dlPL2MqE"), []byte("$1$")))
|
pass = string(auth.MD5Crypt([]byte(pass), []byte("dlPL2MqE"), []byte("$1$")))
|
||||||
secretProvider := func(user, realm string) string {
|
secretProvider := func(u, r string) string {
|
||||||
if user == user {
|
if user == u {
|
||||||
return pass
|
return pass
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Add table
Reference in a new issue