The previous check only looked for ".." substring, which missed: - Absolute paths (/etc/passwd) - URL-encoded traversal patterns - Paths that clean to traversal (./../../etc) Now uses filepath.Clean() and filepath.IsAbs() for robust validation: - Rejects absolute paths - Cleans paths before checking for traversal - Uses cleaned path for database lookup Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
11 KiB
11 KiB