filepath-securejoin icon indicating copy to clipboard operation
filepath-securejoin copied to clipboard

consider migrating to io/fs.StatFS for SecureJoinVFS

Open cyphar opened this issue 9 months ago • 1 comments

Now the Go has their own "generic" interfaces for filesystem roots, maybe it would make sense to migrate to using that rather than our own home-brew thing. Note that we want to be given the equivalent of fs.DirFS("/") not fs.DirFS(root) -- we are implementing our own resolution logic, and the unsafe path.Join logic in io/fs is not going to work.

cyphar avatar May 04 '24 06:05 cyphar

It seems that there's no way to Readlink with io/fs.FS, and it also seems that they expect implementations to follow trailing symlinks (though the docs seem a little unclear). So this might not be possible...

cyphar avatar May 05 '24 04:05 cyphar