#14: Skip padding results in the API response, which can be identified by having a zero count

This commit is contained in:
Winni Neessen 2022-06-09 16:21:10 +02:00
parent 05ea767ee1
commit 8fe5b208a5
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D

View file

@ -118,6 +118,9 @@ func (p *PwnedPassApi) ListHashesPrefix(pf string) ([]Match, *http.Response, err
if err != nil { if err != nil {
continue continue
} }
if hc == 0 {
continue
}
pwMatches = append(pwMatches, Match{ pwMatches = append(pwMatches, Match{
Hash: fh, Hash: fh,
Count: hc, Count: hc,