Add editor interface

This commit is contained in:
2026-04-10 09:53:02 +02:00
parent 5c577b3578
commit 06a3da1d54
4 changed files with 117 additions and 4 deletions

View File

@@ -86,7 +86,8 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
urlPath := path.Clean("/" + r.URL.Path)
fsPath := filepath.Join(h.root, filepath.FromSlash(urlPath))
fsPath := filepath.Join(h.root, filepath.FromSlash(urlPath))
// Security: ensure the resolved path stays within root.
rel, err := filepath.Rel(h.root, fsPath)