Skip to content

If the baseDir for BoundOS is /, then insideBaseDir and insideBaseDirEval always fail #42

@t0rr3sp3dr0

Description

@t0rr3sp3dr0

BoundOS has two function to check whether or not a file is inside the base directory. Their implementation rely on appending filepath.Separator to fs.baseDir and using strings.HasPrefix with filename. This causes a problem when fs.baseDir is the root directory. That's because strings.HasPrefix("/" + filepath.Separator, filename) will never return true with a clean filename.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions