Skip to content

Commit

Permalink
fix(algolia): 403 is invalid (#3653)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgmz authored Nov 21, 2024
1 parent 098072b commit ab36b37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/detectors/algoliaadminkey/algoliaadminkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ func verifyMatch(ctx context.Context, appId, apiKey string) (bool, map[string]st
case http.StatusUnauthorized:
return false, nil, nil
case http.StatusForbidden:
// Key is valid but lacks permissions.
return true, nil, nil
// Invalidated key.
// {"message":"Invalid Application-ID or API key","status":403}
return false, nil, nil
default:
return false, nil, fmt.Errorf("unexpected HTTP response status %d", res.StatusCode)
}
Expand Down

0 comments on commit ab36b37

Please sign in to comment.