Skip to content

fix: confine case paths to storage directory - #16

Merged
rogerchappel merged 1 commit into
mainfrom
agent/oss-153-reject-dot-segments
Jul 22, 2026
Merged

fix: confine case paths to storage directory#16
rogerchappel merged 1 commit into
mainfrom
agent/oss-153-reject-dot-segments

Conversation

@rogerchappel

Copy link
Copy Markdown
Owner

Summary

  • reject normalized case names whose resolved directory is not an immediate child of the configured storage root
  • prevent . and .. from targeting the store itself or its parent
  • add a CLI regression proving new .. fails without writing an index outside the store, while normal case creation still works

Evidence

Before this change, slugify("..") remained .., and path.join(storageDir, "..") allowed clipcase new .. to write index.json in the storage directory parent.

Verification

  • npm ci
  • npm run release:check
  • bash scripts/validate.sh
  • git diff --check

@rogerchappel
rogerchappel merged commit 8ca962a into main Jul 22, 2026
1 check passed
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