If the baseDir
for BoundOS
is /
, then insideBaseDir
and insideBaseDirEval
always fail
#42
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
BoundOS
has two function to check whether or not a file is inside the base directory. Their implementation rely on appendingfilepath.Separator
tofs.baseDir
and usingstrings.HasPrefix
withfilename
. This causes a problem whenfs.baseDir
is the root directory. That's becausestrings.HasPrefix("/" + filepath.Separator, filename)
will never return true with a clean filename.The text was updated successfully, but these errors were encountered: