mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-15 01:17:34 +00:00
Enhanced the eraser detector to handle new status code from verification API (#3342)
This commit is contained in:
parent
ee51fc5cc4
commit
49cb9d395d
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ func verifyMatch(ctx context.Context, client *http.Client, token string) (bool,
|
||||||
switch res.StatusCode {
|
switch res.StatusCode {
|
||||||
case http.StatusOK:
|
case http.StatusOK:
|
||||||
return true, nil, nil
|
return true, nil, nil
|
||||||
case http.StatusNotFound:
|
case http.StatusUnauthorized:
|
||||||
// 404 API token not found
|
// 401 API token unauthorized
|
||||||
// The secret is determinately not verified (nothing to do)
|
// The secret is determinately not verified (nothing to do)
|
||||||
return false, nil, nil
|
return false, nil, nil
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue