Skip to content

fix: allow spread notation route segments in repo path validation - #1458

Merged
tannerlinsley merged 1 commit into
mainfrom
seer/fix/repo-path-spread-segments
Oct 31, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
seer/fix/repo-path-spread-segments

Conversation

@sentry

@sentry sentry Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Cause

isValidRepoPath guarded against path traversal via path.includes('..'). This substring check incorrectly matched three consecutive dots (...) inside valid filenames and directory names commonly used for catch-all route parameters.

Fix

  • Removed path.includes('..') from the global path check.
  • Added an explicit segment-level check (segment === '.' || segment === '..') inside split('/').every(...) so only actual relative/traversal segments are rejected.
  • Added unit tests covering catch-all route files and directories with spread notation, as well as nested, trailing, and current-directory (.) traversal patterns.

Fixes TANSTACK-COM-5DG

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@changeset-bot

changeset-bot Bot commented Oct 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 186fe21

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.

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

@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 418f37e0-e6a2-4007-9888-6f654c7cec9b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 186fe21 Commit Preview URL

Branch Preview URL
Oct 31 2026, 11:06 AM

@tannerlinsley
tannerlinsley merged commit 0c59eb4 into main Oct 31, 2026
8 checks passed
@tannerlinsley
tannerlinsley deleted the seer/fix/repo-path-spread-segments branch October 31, 2026 16:29
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