Skip to content

fix(fs): add validate_path to all InMemoryFs methods#460

Merged
chaliy merged 1 commit intomainfrom
claude/fix-421-Y2nIj
Mar 2, 2026
Merged

fix(fs): add validate_path to all InMemoryFs methods#460
chaliy merged 1 commit intomainfrom
claude/fix-421-Y2nIj

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Mar 2, 2026

Summary

  • Added validate_path() calls to: remove, stat, read_dir, exists, rename, copy, symlink, read_link, chmod
  • copy() now also checks write limits before creating entries
  • Previously only read_file, write_file, append_file, mkdir had validation

Test plan

  • test_validate_path_on_copy — deep path rejected
  • test_validate_path_on_rename — deep path rejected
  • test_copy_respects_write_limits — file count limit enforced
  • test_validate_path_on_chmod — deep path rejected
  • All 1471 lib tests pass

Closes #421

Previously only read_file, write_file, append_file, mkdir had path
validation. Now remove, stat, read_dir, exists, rename, copy,
symlink, read_link, chmod all validate. copy() also checks write
limits before creating entries.

Closes #421

https://claude.ai/code/session_01WZjYqxm5xMPAEe7FSHJkDy
@chaliy chaliy merged commit 27743aa into main Mar 2, 2026
17 checks 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.

[M-7] Missing validate_path() across multiple VFS methods

2 participants