Skip to content

fix: Use the object form paramsSerializer in the request url - #1015

Open
razor-x wants to merge 3 commits into
mainfrom
claude/js-sdk-audit-6x115l-l8a-params-serializer
Open

fix: Use the object form paramsSerializer in the request url#1015
razor-x wants to merge 3 commits into
mainfrom
claude/js-sdk-audit-6x115l-l8a-params-serializer

Conversation

@razor-x

@razor-x razor-x commented Aug 24, 2026

Copy link
Copy Markdown
Member

Problem

SDK audit finding L8a (low): the SeamHttpRequest.url getter only honored a function-form paramsSerializer and silently fell back to Seam's serializer when the user configured axios's object form ({ serialize, encode, indexes }). Axios itself uses the object form when sending, so the inspected request.url diverged from the wire URL — debug output lying about the request.

Fix

The getter now also uses paramsSerializer.serialize when the object form is configured, falling back to the SDK serializer only when neither form is present (the SDK default).

Tests

Both custom forms pinned: a function-form serializer and an object-form serializer each control request.url's query. The object-form test fails on reverted source (falls back to the SDK serializer). Full suite (127 tests), lint, typecheck green.

Part of applying the rev-3 SDK audit (one PR per finding). Related: #1002#1014.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B8xeJm2Hd923k8uo6eoFd2


Generated by Claude Code

The url getter only honored a function form paramsSerializer and
silently fell back to the SDK serializer for the object form axios also
accepts, so the inspected request URL diverged from the URL actually
sent on the wire.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8xeJm2Hd923k8uo6eoFd2
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