Merge pull request #247 from xiaolai/fix/nlpm-zapier-webhook-url-validation

fix: validate https:// scheme for hooks send webhook URL in zapier.js
This commit is contained in:
Corey Haines
2026-04-21 12:01:13 -07:00
committed by GitHub
+2
View File
@@ -122,7 +122,9 @@ async function main() {
case 'hooks':
switch (sub) {
case 'send': {
// Sends a POST to a Zapier webhook catch hook URL (e.g. https://hooks.zapier.com/hooks/catch/...)
if (!args.url) { result = { error: '--url required' }; break }
if (!args.url.startsWith('https://')) { result = { error: '--url must use https://' }; break }
if (!args.data) { result = { error: '--data required (JSON string)' }; break }
let data
try {