Trim comments to the non-obvious why
Test and deploy / test (push) Successful in 28s
Test and deploy / deploy (push) Successful in 31s

Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 20:49:03 +00:00
co-authored by Claude Opus 5.5
parent effddd2794
commit 4530cb8dc4
222 changed files with 1173 additions and 5423 deletions
+2 -7
View File
@@ -26,13 +26,8 @@ func InitNotes(config *NotesConfig) *Notes {
}
}
// ParsePath resolves a user-supplied request path to an absolute path inside
// the notes directory, or returns an error if it would escape.
//
// The traversal guard is the prefix check at the end. filepath.Join already
// cleans "..", but the separator is appended to baseDir before comparing so
// that a sibling directory whose name merely starts with the same characters
// (e.g. /backend/notes-private next to /backend/notes) cannot pass the check.
// ParsePath appends the separator before the prefix check, so a sibling such
// as /backend/notes-private can't pass.
func (notes *Notes) ParsePath(path string) (string, error) {
// The route is /notes/*path, so a bare /notes/ arrives as "" or "/";
// treat both as a request for the wiki index.