Skip to content

Commit

Permalink
Update Slack webhook error text for verification (#1427)
Browse files Browse the repository at this point in the history
This updates the matched error text to determine the verified status of a Slack webhook, as this has been updated on Slack's API.
  • Loading branch information
atkinchris committed Jun 26, 2023
1 parent 146ddb3 commit 6e6895b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/detectors/slackwebhook/slackwebhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
continue
}
body := string(bodyBytes)
if (res.StatusCode >= 200 && res.StatusCode < 300) || (res.StatusCode == 400 && strings.Contains(body, "no_text")) {
if (res.StatusCode >= 200 && res.StatusCode < 300) || (res.StatusCode == 400 && (strings.Contains(body, "no_text") || strings.Contains(body, "missing_text"))) {
s1.Verified = true
}
}
Expand Down

0 comments on commit 6e6895b

Please sign in to comment.