filepath.Clean("/"+p) returns absolute path, filepath.Join(root, "/abs")
drops root on Linux. Strip leading "/" before joining with sandbox root.
Currently not exploitable (validatePath handles it), but any future
caller of path() with active sandbox would escape. Defensive fix.
Found by Gemini Pro security review.
Co-Authored-By: Virgil <virgil@lethean.io>
|
||
|---|---|---|
| .. | ||
| core | ||
| log | ||
| mnt | ||