test: hibp api changes

This commit is contained in:
decentral1se 2022-11-07 21:02:59 +01:00
parent ed71cda319
commit d169aaf137
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 6 additions and 3 deletions

View File

@ -46,10 +46,13 @@ func newMembersHandler(devMode bool, r *render.Renderer, urlTo web.URLMaker, fh
}
} else {
// Init the have-i-been-pwned client for insecure password checks.
const storeExpiry = 1 * time.Hour
hibpClient := hibp.NewClient(storeExpiry)
httpClient := http.DefaultClient
httpClient.Timeout = 1 * time.Hour
mh.leakedLookup = hibpClient.Pwned.Compromised
hibpClient := hibp.NewClient()
hibpClient.SetHTTPClient(httpClient)
mh.leakedLookup = hibpClient.Compromised
}
return mh