Skip to content

Fix open enum range checks#1442

Open
timostamm wants to merge 1 commit into
mainfrom
tstamm/Fix-open-enum-range-checks
Open

Fix open enum range checks#1442
timostamm wants to merge 1 commit into
mainfrom
tstamm/Fix-open-enum-range-checks

Conversation

@timostamm

Copy link
Copy Markdown
Member

Open enums accept unrecognized values, but enum values are always int32 (see https://protobuf.dev/programming-guides/proto3/#enum).

The reflection check used Number.isInteger, so it accepted any integer, including values outside int32 range that can't be serialized. This narrows the check to verify that open enum values are within range.

Open enums accept unrecognized values, but enum values are always int32 (see https://protobuf.dev/programming-guides/proto3/#enum).

The reflection check used Number.isInteger, so it accepted any integer, including values outside int32 range that can't be serialized. This narrows the check to verify that open enum values are within range.
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
protobuf-es Ignored Ignored Jun 19, 2026 11:49am

Request Review

@timostamm timostamm requested a review from ajeetdsouza June 19, 2026 11:49
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.

1 participant