Skip to content

Commit

Permalink
feat: ✨ safe check for slack response url
Browse files Browse the repository at this point in the history
  • Loading branch information
AkashRajpurohit committed Nov 8, 2024
1 parent 4821e87 commit 5de8ab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ app.post('/slack/giffy', async (c) => {
});
}

if (!responseUrl) {
if (!responseUrl || !responseUrl.startsWith('https://hooks.slack.com')) {
return c.json({
response_type: 'ephemeral',
text: "Sorry, slash commando, that didn't work. Please try again.",
Expand Down

0 comments on commit 5de8ab5

Please sign in to comment.