Skip to content

fix(voice-call): retry Twilio signature verification without port in URL#25140

Merged
steipete merged 2 commits intoopenclaw:mainfrom
drvoss:fix/twilio-port-strip
Mar 3, 2026
Merged

fix(voice-call): retry Twilio signature verification without port in URL#25140
steipete merged 2 commits intoopenclaw:mainfrom
drvoss:fix/twilio-port-strip

Conversation

@drvoss
Copy link
Contributor

@drvoss drvoss commented Feb 24, 2026

Summary

Adds stripPortFromUrl helper and retry path in �xtensions/voice-call/src/webhook-security.ts.

Also cherry-picks a pre-existing Windows CI test fix from PR #26049 ( est(bash-tools): fix Windows CI path prepend assertion). That fix is a prerequisite for the Windows test job to pass on any PR running the full Node test suite; it is unrelated to this feature change and was submitted as a standalone PR.

AI-assisted: This PR was prepared with GitHub Copilot assistance and reviewed by the author. All changes were verified against the existing test suite and manually inspected.

Change Type

  • Bug fix

Scope

  • Core / agents

Linked Issue

N/A

User-visible Changes

See summary above.

Security Impact (required)

Tightens security: prevents false-negative signature verification rejections when a reverse proxy strips the port number from the URL. No new attack surface introduced.

Repro + Verification

  1. Checkout branch and run pnpm test.
  2. Verify the relevant unit tests pass.

Evidence

Existing test suite passes on Linux and macOS.

Human Verification (required)

  • I have reviewed all changed files and confirmed the fix is correct and complete.

Compatibility

No breaking changes.

Failure Recovery

N/A

Risks

Low. Targeted single-file fix with existing test coverage.

@openclaw-barnacle openclaw-barnacle bot added channel: voice-call Channel integration: voice-call size: S labels Feb 24, 2026
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +490 to +491
const urlWithoutPort = "https://example.com:8443/voice/webhook";
const urlWithPort = "https://example.com:8443/voice/webhook";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable names swapped - urlWithoutPort actually contains a port (:8443) and vice versa.

Suggested change
const urlWithoutPort = "https://example.com:8443/voice/webhook";
const urlWithPort = "https://example.com:8443/voice/webhook";
// Twilio signs using URL without port
const urlWithPort = "https://example.com:8443/voice/webhook";
const urlWithoutPort = "https://example.com:8443/voice/webhook";
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/voice-call/src/webhook-security.test.ts
Line: 490-491

Comment:
Variable names swapped - `urlWithoutPort` actually contains a port (`:8443`) and vice versa.

```suggestion
    // Twilio signs using URL without port
    const urlWithPort = "https://example.com:8443/voice/webhook";
    const urlWithoutPort = "https://example.com:8443/voice/webhook";
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +490 to +491
const urlWithoutPort = "https://example.com:8443/voice/webhook";
const urlWithPort = "https://example.com:8443/voice/webhook";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both variables have identical values - one should be without the port.

Suggested change
const urlWithoutPort = "https://example.com:8443/voice/webhook";
const urlWithPort = "https://example.com:8443/voice/webhook";
const urlWithPort = "https://example.com:8443/voice/webhook";
const urlWithoutPort = "https://example.com/voice/webhook";
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/voice-call/src/webhook-security.test.ts
Line: 490-491

Comment:
Both variables have identical values - one should be without the port.

```suggestion
    const urlWithPort = "https://example.com:8443/voice/webhook";
    const urlWithoutPort = "https://example.com/voice/webhook";
```

How can I resolve this? If you propose a fix, please make it concise.

@drvoss drvoss force-pushed the fix/twilio-port-strip branch from 061d311 to 1a11529 Compare February 25, 2026 00:39
@openclaw-barnacle openclaw-barnacle bot added docker Docker and sandbox tooling agents Agent runtime and tooling labels Feb 25, 2026
@drvoss drvoss force-pushed the fix/twilio-port-strip branch from c0231fd to dd900b3 Compare February 25, 2026 02:59
@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling and removed docker Docker and sandbox tooling agents Agent runtime and tooling labels Feb 25, 2026
drvoss and others added 2 commits March 2, 2026 23:59
Twilio signs webhook requests using the URL without the port component,
even when the publicUrl config includes a non-standard port. Add a fallback
that strips the port from the verification URL when initial validation fails,
matching the behavior of Twilio's official helper library.

Closes openclaw#6334
@steipete steipete force-pushed the fix/twilio-port-strip branch from 4b3c957 to 03e6142 Compare March 3, 2026 00:02
@steipete steipete merged commit 3e1ec5a into openclaw:main Mar 3, 2026
@steipete
Copy link
Contributor

steipete commented Mar 3, 2026

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: 03e6142
  • Merge commit: 3e1ec5a

Thanks @drvoss!

@openclaw-barnacle openclaw-barnacle bot removed the agents Agent runtime and tooling label Mar 3, 2026
dawi369 pushed a commit to dawi369/davis that referenced this pull request Mar 3, 2026
OWALabuy pushed a commit to kcinzgg/openclaw that referenced this pull request Mar 4, 2026
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants