slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.64k stars 1.13k forks source link

fix: panic when ParseEvent if event data not provide #1128

Closed sword-jin closed 9 months ago

sword-jin commented 1 year ago
API changes

No API changes

Bug fixes
noInnerEvent := `{"type":"event_callback"}`
slackevents.ParseEvent(json.RawMessage(noInnerEvent))

When json don't contains event field, ParseEvent will panic.

sword-jin commented 1 year ago

s the case when the event field is not sent? It would be helpful if you could

In my own service, integrated slack webhook, fuzz testing!

github-actions[bot] commented 1 year ago

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.