mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
Unexport users map in htpasswd struct
This commit is contained in:
parent
6bc87b8e95
commit
b0036d006b
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ type HtpasswdFile struct {
|
|||
path string
|
||||
stat os.FileInfo
|
||||
throttle chan struct{}
|
||||
Users map[string]string
|
||||
users map[string]string
|
||||
}
|
||||
|
||||
// NewHtpasswdFromFile reads the users and passwords from a htpasswd file and returns them. If an error is encountered,
|
||||
|
@ -130,7 +130,7 @@ func (h *HtpasswdFile) Reload() error {
|
|||
|
||||
// Replace the Users map
|
||||
h.mutex.Lock()
|
||||
h.Users = users
|
||||
h.users = users
|
||||
h.mutex.Unlock()
|
||||
|
||||
_ = r.Close()
|
||||
|
@ -178,7 +178,7 @@ func (h *HtpasswdFile) Validate(user string, password string) bool {
|
|||
_ = h.ReloadCheck()
|
||||
|
||||
h.mutex.Lock()
|
||||
realPassword, exists := h.Users[user]
|
||||
realPassword, exists := h.users[user]
|
||||
h.mutex.Unlock()
|
||||
|
||||
if !exists {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue