Skip to content

fix(js): Prevent argument injection via type coercion in serializeOptions#3287

Open
JPeer264 wants to merge 1 commit intomasterfrom
fix/argument-injection-type-coercion
Open

fix(js): Prevent argument injection via type coercion in serializeOptions#3287
JPeer264 wants to merge 1 commit intomasterfrom
fix/argument-injection-type-coercion

Conversation

@JPeer264
Copy link
Copy Markdown
Member

Description

Add runtime type validation for string/number options to match existing validation for array and boolean types. Wrap arguments in array literal to prevent concat() from flattening array inputs.

(there is no ticket for it)

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@JPeer264 JPeer264 self-assigned this Apr 30, 2026
@JPeer264 JPeer264 requested review from a team as code owners April 30, 2026 09:11
@JPeer264 JPeer264 force-pushed the fix/argument-injection-type-coercion branch from 5a5f0ce to 8c0a8e4 Compare April 30, 2026 09:13
…ions

Add runtime type validation for string/number options to match existing
validation for array and boolean types. Wrap arguments in array literal
to prevent concat() from flattening array inputs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@JPeer264 JPeer264 force-pushed the fix/argument-injection-type-coercion branch from 8c0a8e4 to 699941f Compare April 30, 2026 09:13
@szokeasaurusrex
Copy link
Copy Markdown
Member

I'll let someone from the JS SDK team review this

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