Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Validate FLAGS_SECRET length for precompute JWS codes#380

Open
OWConnoi wants to merge 1 commit into
vercel:main from
OWConnoi:codex/validate-flags-secret
Open

Validate FLAGS_SECRET length for precompute JWS codes #380
OWConnoi wants to merge 1 commit into
vercel:main from
OWConnoi:codex/validate-flags-secret

Conversation

@OWConnoi

@OWConnoi OWConnoi commented May 11, 2026

Copy link
Copy Markdown

What

This aligns precompute JWS signing/verification with the documented FLAGS_SECRET requirement by rejecting secrets that do not decode to 32 bytes.

Why

The JWE helpers already enforce a 256-bit key. Precompute serialization used the decoded secret directly for HS256, so accidentally short secrets were accepted. Using the same validation here makes misconfiguration fail early and keeps the secret handling consistent across the package.

Tests

  • npx --yes pnpm@10.19.0 --filter flags test
  • npx --yes pnpm@10.19.0 --filter flags check
  • npx --yes pnpm@10.19.0 --filter flags type-check

vercel Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

@OWConnoi is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /