Skip to content

fix(express): forward query strings without deprecated url.parse - #10142

Merged
danielpeng1 merged 1 commit into
masterfrom
WCN-4315-bitgo-express-errors
Nov 12, 2026
Merged

danielpeng1 merged 1 commit into
masterfrom
WCN-4315-bitgo-express-errors

Conversation

@danielpeng1

Copy link
Copy Markdown
Contributor

Eliminate the DEP0169 url.parse() deprecation warning emitted by BitGo Express on proxied requests with query parameters.

  • createAPIPath in modules/express/src/clientRoutes.ts extracts the query string by slicing req.url from the first ? up to any #, replacing the legacy url.parse() call that triggered DEP0169.
  • The slice preserves query bytes exactly as the client sent them and matches legacy url.parse().search behavior, including stripping fragments; the unused url import is removed.
  • Affects only the catch-all proxy handlers that call createAPIPath (v1 REST passthrough, v2 user, v2 coin-specific); local typed routes and the coin modules' getAddressDetails url.parse calls are unchanged.

Tests

  • modules/express/test/unit/clientRoutes/proxiedQueryStrings.ts runs real requests through the express app and asserts the exact upstream request path via nock: no query, simple query, percent-encoded values (%20, %27, %2B), +, repeated keys, empty value, bare ?, and v2 user and v2 coin paths forwarded byte-for-byte.

Ticket: WCN-4315

@danielpeng1 danielpeng1 self-assigned this Nov 6, 2026
@linear-code

linear-code Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

WCN-4315

WCN-4316

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

@danielpeng1
danielpeng1 marked this pull request as ready for review November 6, 2026 21:02
@danielpeng1
danielpeng1 requested review from a team as code owners November 6, 2026 21:02

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@danielpeng1

Copy link
Copy Markdown
Contributor Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread modules/express/src/clientRoutes.ts Resolved
@danielpeng1

Copy link
Copy Markdown
Contributor Author

this is only for the express-side call site

@danielpeng1
danielpeng1 merged commit 934d018 into master Nov 12, 2026
29 checks passed
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