Refuse a path with a . segment (closes #208)
check / check (push) Canceled after 0s

ValidatePath refused a .. segment but accepted a . segment, so a
manifest could list ./a.txt. check then verified a.txt and also
reported it as an extra file, and one file could be listed twice under
two spellings despite the listed-once rule. A . segment is now refused
when a manifest is written and when it is loaded, and the Path Rules
in docs/FORMAT.md and the path comment in mfer/mf.proto list it.

Two fetch tests listed ./ paths to check name clashes; such manifests
can no longer be built, so those cases are removed.

Model: opus-5-5
This commit was merged in pull request #214.
This commit is contained in:
2026-10-14 00:01:12 +02:00
parent 8ec3fd9a67
commit 2cfea66d27
9 changed files with 31 additions and 16 deletions
+2
View File
@@ -80,6 +80,8 @@ func TestDeserializeRejectsInvalidEntryPaths(t *testing.T) {
}{
{"parent traversal", "../escape"},
{"interior traversal", "a/../../escape"},
{"leading dot segment", "./a.txt"},
{"interior dot segment", "dir/./a.txt"},
{"absolute path", "/etc/passwd"},
{"backslash path", `a\b`},
{"double slash", "a//b"},