Merge pull request #49 from wneessen/go-hibp-update

Upgrade go-hibp to v1.0.4 and fix the breaking changes
This commit is contained in:
Winni Neessen 2022-10-29 20:44:22 +02:00 committed by GitHub
commit a08b362e19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -135,8 +135,8 @@ func main() {
} }
if cfgObj.CheckHibp { if cfgObj.CheckHibp {
hc := hibp.New(hibp.WithHttpTimeout(time.Second*2), hibp.WithPwnedPadding()) hc := hibp.New(hibp.WithHTTPTimeout(time.Second*2), hibp.WithPwnedPadding())
pwnObj, _, err := hc.PwnedPassApi.CheckPassword(p) pwnObj, _, err := hc.PwnedPassAPI.CheckPassword(p)
if err != nil { if err != nil {
log.Printf("unable to check HIBP database: %v", err) log.Printf("unable to check HIBP database: %v", err)
} }

2
go.mod
View file

@ -2,4 +2,4 @@ module github.com/wneessen/apg-go
go 1.16 go 1.16
require github.com/wneessen/go-hibp v1.0.3 require github.com/wneessen/go-hibp v1.0.4

2
go.sum
View file

@ -1,2 +1,4 @@
github.com/wneessen/go-hibp v1.0.3 h1:7T5tAoqre6+A4CdZRXZb9VbxWCcdzr+BdskyghxpaME= github.com/wneessen/go-hibp v1.0.3 h1:7T5tAoqre6+A4CdZRXZb9VbxWCcdzr+BdskyghxpaME=
github.com/wneessen/go-hibp v1.0.3/go.mod h1:Ldg6DQg4fMCveVKgL+RL9Jy+9TsljjAP704Ix8X3jOw= github.com/wneessen/go-hibp v1.0.3/go.mod h1:Ldg6DQg4fMCveVKgL+RL9Jy+9TsljjAP704Ix8X3jOw=
github.com/wneessen/go-hibp v1.0.4 h1:G/DPSu30FD/M/JFqFK+2512z3OilCUF1LdQnB8Xzx5g=
github.com/wneessen/go-hibp v1.0.4/go.mod h1:Ldg6DQg4fMCveVKgL+RL9Jy+9TsljjAP704Ix8X3jOw=