Skip to content

Validate 'next-action' header format in server action requests #3523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

conico974
Copy link
Contributor

Implement validation for the 'next-action' header format to ensure it meets the expected criteria before processing server action requests. This change enhances request handling by rejecting invalid formats early.

Copy link

linear bot commented Aug 1, 2025

Copy link

changeset-bot bot commented Aug 1, 2025

⚠️ No Changeset found

Latest commit: 30fc171

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

argos-ci bot commented Aug 1, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) ✅ No changes detected - Aug 5, 2025, 8:18 AM
v2-cloudflare (Inspect) 👍 Changes approved 9 changed Aug 5, 2025, 8:50 AM
v2-vercel (Inspect) 👍 Changes approved 8 changed Aug 5, 2025, 8:23 AM

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements validation for the 'next-action' header format in server action requests to ensure it meets the expected format before processing. The validation checks that the header matches a specific pattern (1-byte hex string followed by a 20-byte SHA1 hash).

  • Adds regex validation to check 'next-action' header format against the expected 42-character hex pattern
  • Returns early 400 response for invalid header formats
  • Restructures the existing server action validation logic to accommodate the new header format check

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