mirror of
https://github.com/restic/rest-server.git
synced 2026-10-15 23:20:05 -07:00
correct htpasswd cache expiry
was 0-5 seconds instead of the intended one minute.
This commit is contained in:
+1
-1
@@ -123,7 +123,7 @@ func (h *HtpasswdFile) expiryTimer() {
|
||||
var zeros [sha256.Size]byte
|
||||
// try to wipe expired cache entries
|
||||
for user, entry := range h.cache {
|
||||
if entry.expiry.After(now) {
|
||||
if now.After(entry.expiry) {
|
||||
copy(entry.verifier, zeros[:])
|
||||
delete(h.cache, user)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user