#16619: fix(line): allow signatureless empty-events webhook verification
stale
size: S
Cluster:
Webhook Security Enhancements
## Describe your changes
- Classify LINE webhook payloads before signature checks so `events: []` verification probes are handled correctly.
- Bypass signature validation only for empty-events verification probes, while preserving strict signature enforcement for actual event deliveries.
- Reuse shared webhook payload classification helpers across both LINE webhook entrypoints (`monitor` and Express middleware) to keep behavior consistent.
## Screenshot or video (only for visual changes)
- N/A
## GitHub Issue Link (if applicable)
- https://github.com/openclaw/openclaw/issues/16425
## Testing Plan
- Explanation of why no additional tests are needed:
- Added focused unit tests for verification probe classification and signature-header validation behavior.
- Unit Tests (JS and/or Python):
- `pnpm test -- src/line/webhook.test.ts src/line/signature.test.ts src/line/webhook-verification.test.ts src/line/monitor.read-body.test.ts`
- E2E Tests:
- Not run (requires live LINE webhook callbacks).
- Any manual testing needed?:
- Optional: use LINE Developers Console webhook "Verify" and confirm a clean HTTP 200 response without signature errors.
---
**Contribution License Agreement**
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Most Similar PRs
#17182: security(line): fail closed when webhook token/secret are missing
by davidahmann · 2026-02-15
69.3%
#18777: fix: LINE webhook acknowledges events before processing and drops f...
by coygeek · 2026-02-17
68.8%
#17593: security: fail closed when LINE webhook secret is missing
by davidahmann · 2026-02-15
66.5%
#21531: Security/Webhooks: block signed replay for Nextcloud, Google Chat, ...
by bmendonca3 · 2026-02-20
64.8%
#5834: fix(line): add timeout and size limit to readRequestBody to prevent...
by hclsys · 2026-02-01
64.2%
#23621: fix(LINE): keep startAccount promise alive to prevent auto-restart ...
by ttakanawa · 2026-02-22
60.1%
#21532: Security/Voice Call: block signed webhook replay
by bmendonca3 · 2026-02-20
59.3%
#20775: fix(security): OC-10 add webhook payload schema validation to preve...
by aether-ai-agent · 2026-02-19
58.3%
#20420: Telegram webhook listener to use the gateway's HTTP server instead ...
by kesor · 2026-02-18
58.2%
#17289: test(line): add DM policy matrix coverage for open/allowlist/pairin...
by davidahmann · 2026-02-15
57.9%