You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we can't really control that / is root, and it's memfs in zenfs, it would be cool to be able to sort of "chroot" (lock access to a specific directory.) This would allow mounting /zip then switching / to /zip, so /cyber.txt is a file inside the zip.
I think this could be done by translating any directories to prepend this.rootDir and then allow setting that.
Normally, I would make sure that users can't do things like /somedir/../../.., but for this case it's not really important. It's sort of a "light sandbox" since you can just not mount things you don't want the user to access, still maybe a "nice to have" to make sure it can't access anything outside of /.
The text was updated successfully, but these errors were encountered:
I may just make my own fs-like to handle this. I have already been using emscripten's FS directly, to provide fs for another WASI (shared only between the 2, but not other instances) and it works fine. filer is also maybe a better fit, since it does not use a global fs.
Since we can't really control that
/
is root, and it's memfs in zenfs, it would be cool to be able to sort of "chroot" (lock access to a specific directory.) This would allow mounting/zip
then switching/
to/zip
, so/cyber.txt
is a file inside the zip.I think this could be done by translating any directories to prepend
this.rootDir
and then allow setting that.Normally, I would make sure that users can't do things like
/somedir/../../..
, but for this case it's not really important. It's sort of a "light sandbox" since you can just not mount things you don't want the user to access, still maybe a "nice to have" to make sure it can't access anything outside of/
.The text was updated successfully, but these errors were encountered: