Skip to content

Throw a more descriptive error when calling rawRequest with absolute urls#2663

Merged
xavdid merged 2 commits intomasterfrom
DEVSDK-3060-rawrequest
Apr 6, 2026
Merged

Throw a more descriptive error when calling rawRequest with absolute urls#2663
xavdid merged 2 commits intomasterfrom
DEVSDK-3060-rawrequest

Conversation

@xavdid
Copy link
Copy Markdown
Member

@xavdid xavdid commented Apr 6, 2026

Why?

Passing absolute urls in rawRequest has never been supported, but it happened to work before. There are security implications to allowing absolute urls with untrusted input, so we're validating against it now and throwing an error.

What?

  • validate that a raw request path starts with a leading /
  • don't use the second argument to new URL, since that can be used to overwrite the host
  • tests

See Also

@xavdid xavdid requested a review from a team as a code owner April 6, 2026 21:16
@xavdid xavdid requested review from jar-stripe and prathmesh-stripe and removed request for a team April 6, 2026 21:16
@xavdid xavdid enabled auto-merge (squash) April 6, 2026 21:16
@xavdid xavdid merged commit 08e7260 into master Apr 6, 2026
11 checks passed
@xavdid xavdid deleted the DEVSDK-3060-rawrequest branch April 6, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants