Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Allow arbitrary JavaScript execution
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Aug 22, 2019
1 parent 96a7813 commit 1c88a05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ async function run() {
throw new Error('SLACK_WEBHOOK_URL is not set');
}
const webhook = new IncomingWebhook(process.env.SLACK_WEBHOOK_URL);
const payload = JSON.parse(core.getInput('payload'));
var payload = eval("payload = " + core.getInput('payload'));

await webhook.send(payload);
await webhook.send(JSON.parse(JSON.stringify(payload)));
} catch (error) {
core.setFailed(error.message);
}
Expand Down

0 comments on commit 1c88a05

Please sign in to comment.