Repository navigation
fix(voice-call): pin Twilio webhook verification to the configured public path - #112800
vincentkoc merged 3 commits into
Conversation
…blic path buildTwilioVerificationUrl overwrote the configured publicUrl path with the incoming request path, so behind a path-rewriting reverse proxy the reconstructed verification URL no longer matched the URL Twilio signed and valid webhooks were rejected. Use the configured public path (keep the request query), mirroring the Plivo sibling fixed in openclaw#112559. Restores callback-path binding and adds proxy-prefix accept + local-path reject regression tests.
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 12:29 PM ET / 16:29 UTC. ClawSweeper reviewWhat this changesThe PR makes Twilio webhook verification retain the configured public URL path while applying the inbound request query, with regression coverage and updated proxy/signature documentation. Merge readinessKeep this PR open for normal maintainer landing. The focused change appears to correct a real Twilio URL-signature mismatch behind path-rewriting proxies, preserves the intended configured public endpoint boundary, has targeted negative coverage, and has adequate provider-oracle proof; the remaining gate is review of the current-head CI result rather than a new code repair. Priority: P1 Review scores
Verification
How this fits togetherThe voice-call plugin receives provider webhooks and verifies their signatures before handing calls into OpenClaw. Twilio signs the externally configured webhook URL, so the verification layer must distinguish the public provider-facing path from a reverse proxy’s local request path. flowchart LR
A[Twilio webhook request] --> B[Reverse proxy]
B --> C[Voice-call webhook handler]
C --> D[Twilio signature verifier]
E[Configured public URL] --> D
D --> F[Accept or reject webhook]
F --> G[Voice-call processing]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +1, Tests -6, Docs +2. Total -3 across 3 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the narrow verifier change after current-head CI confirms the exact merge result, retaining Do we have a high-confidence way to reproduce the issue? Yes in source, with medium confidence: the documented path-rewriting proxy case reaches the Twilio verifier with a local path that previously replaced the configured public path, and the PR provides before/after official-SDK signing-oracle results. I did not independently execute the reproduction in this read-only review. Is this the best way to solve the issue? Yes. Preserving the configured provider-facing URL path and applying only the request query is the narrowest maintainable repair; it avoids changing configuration, provider APIs, or unrelated webhook routing. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 6dc13c63b6be. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* origin/main: (446 commits) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) fix(sms): isolate validated webhook quotas per sender (openclaw#104862) fix(sessions): recover deleted chats without endless retries (openclaw#115974) fix(restart): log errors from restart hook callbacks instead of swallowing (openclaw#108847) feat(ui): enable tool-loop detection from Labs (openclaw#115983) fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (openclaw#100998) fix(memory): keep rollbacks compatible after recall metadata upgrade (openclaw#116003) fix(ui): derive cron timezone suggestions (openclaw#115973) fix(scripts): bound dependency pin git lookups (openclaw#110570) fix(skills): preserve configless workshop apply upgrades (openclaw#115982) fix(gateway): cancel unread cron webhook bodies before SSRF release (openclaw#111236) fix(voice-call): pin Twilio webhook verification to the configured public path (openclaw#112800) fix(memory): make legacy session backfill rollback re-applicable (openclaw#116004) fix(security): fence external hook job name in isolated-agent prompts (openclaw#112501) fix(channels): mark durable webhook acceptance on Zalo, Google Chat, SMS, Feishu, Nextcloud Talk, and Synology Chat (openclaw#115586) fix(test): restore stdin TTY descriptors (openclaw#115985) fix(plugins): remove incorrect modifying hook timeout fallback in getClaimingHookTimeoutMs (openclaw#107996) ... # Conflicts: # extensions/openai/realtime-quicksilver-wire.ts
* origin/main: (683 commits) fix(discord): bound webhook send body reads (openclaw#109076) fix(ui): preserve initials for missing user avatars (openclaw#115976) feat(ui): add provider icons to coding catalogs (openclaw#115956) fix(daemon): refuse duplicate launchd gateway managers (openclaw#97285) fix(memory-lancedb): share the recall cooldown with the auto-recall prompt-build hook (openclaw#112927) fix(test): isolate plugin install fixtures (openclaw#116008) fix(feishu): guard Object.assign against prototype pollution in webhook payload merge (openclaw#111729) fix(sms): isolate validated webhook quotas per sender (openclaw#104862) fix(sessions): recover deleted chats without endless retries (openclaw#115974) fix(restart): log errors from restart hook callbacks instead of swallowing (openclaw#108847) feat(ui): enable tool-loop detection from Labs (openclaw#115983) fix(telegram): catch unhandled rejections in webhook and ingress worker shutdown (openclaw#100998) fix(memory): keep rollbacks compatible after recall metadata upgrade (openclaw#116003) fix(ui): derive cron timezone suggestions (openclaw#115973) fix(scripts): bound dependency pin git lookups (openclaw#110570) fix(skills): preserve configless workshop apply upgrades (openclaw#115982) fix(gateway): cancel unread cron webhook bodies before SSRF release (openclaw#111236) fix(voice-call): pin Twilio webhook verification to the configured public path (openclaw#112800) fix(memory): make legacy session backfill rollback re-applicable (openclaw#116004) fix(security): fence external hook job name in isolated-agent prompts (openclaw#112501) ... # Conflicts: # CHANGELOG.md # src/agents/tool-search-catalog.ts # src/agents/tool-search.test-support.ts # src/agents/tool-search.ts
…blic path (openclaw#112800) * fix(voice-call): pin Twilio webhook verification to the configured public path buildTwilioVerificationUrl overwrote the configured publicUrl path with the incoming request path, so behind a path-rewriting reverse proxy the reconstructed verification URL no longer matched the URL Twilio signed and valid webhooks were rejected. Use the configured public path (keep the request query), mirroring the Plivo sibling fixed in openclaw#112559. Restores callback-path binding and adds proxy-prefix accept + local-path reject regression tests. * fix(voice-call): pin Twilio verification to public URL path --------- Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Twilio signs the provider-facing webhook URL. When a reverse proxy maps a public path such as
/proxy/voice/webhookto a different localserve.path, current OpenClaw overwrites the configuredpublicUrlpath with the local request path before verification. A correctly signed Twilio request is then rejected.Deployments where public and local paths already match are unchanged.
Why This Rewrite
The maintainer rewrite keeps the configured
publicUrlscheme, host, and path and applies only the per-request query string. That is the narrow owner-boundary fix:publicUrlowns the provider-facing URL, while the incoming request owns request-specific query parameters.The original PR was broader than needed. Its duplicate test cases were collapsed, and its documentation no longer implies that Telnyx signatures use request URLs.
User Impact
Twilio voice-call webhooks behind path-rewriting proxies verify against the URL configured with Twilio. No config, schema, or API changes are introduced.
Maintainer Rewrite
d49601b17d37019b55683108f31a651df4fb3e13b4d14d78480650860423964b4b450e8a3f878150Changed surfaces:
extensions/voice-call/src/webhook-security.ts: preserve configured path; copy only request query.extensions/voice-call/src/webhook-security.test.ts: prove the configured-path signature succeeds and the rewritten local-path signature fails.docs/plugins/voice-call.md: document proxy mapping and provider-specific URL-signature behavior.Evidence
The production entry path is
extensions/voice-call/src/webhook.tsthrough the Twilio owner adapter inextensions/voice-call/src/providers/twilio/webhook.tstoverifyTwilioWebhook().Current-main reproduction with the official Twilio Node SDK signing oracle:
After the fix:
This matches Twilio's documented contract: request validation signs the full configured URL, including its path and query, plus POST parameters.
Verification
40/40passed.oxfmt,oxlint, MDX validation, andgit diff --check: passed.0.96.No live Twilio account request was made; the official SDK was used as the signing oracle against the production verifier.
Docs
Public page:
https://docs.openclaw.ai/plugins/voice-call