mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
lib/http: Fix bad username check in single auth secret provider
This commit is contained in:
parent
1cb31e8cc7
commit
b1cb41f8da
@ -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…
Reference in New Issue
Block a user