Allow to use the clientside File class one layer up
complete
GTNardy
complete
I will allow reading files from outside .transient folder on client side (but still only inside Packages/), writing will still only be allowed inside .transient
T
Timmy
GTNardy: Please tell me it'll not be possible on the server side
GTNardy
Timmy: Nothing changed on server side
GTNardy
The only thing that changed is that now it's also possible to read files from Client's Package/* folder
T
Timmy
GTNardy: Just seen that it was already possible on the server, it seems concerning regading safety since malicious packages could have a way to remotely read the server files to find database credentials, tokens, ... and other sensitive data that shouldn't be exposed outside of it's respective package
GTNardy
Timmy: on server you can only access files from Server/ folder, except Config.toml one
T
Timmy
GTNardy: That makes the server token safe, but eveything that's in a package isn't if you don't pay attention of other packages you're adding to your server
GTNardy
Timmy: any suggestion on how to solve that?
T
Timmy
GTNardy: Prevent
File
to read outside of /Server/Packages/package-its-called-from on the server sideGTNardy
Timmy: waiting Voltaism to come and curse on it....
T
Timmy
GTNardy: Why not rely on the lua's
io
library for that? since you added --enable_unsafe_libs it seems like an alternative that'd allow to keep a safe behaviour by defaultGTNardy
Timmy: how so? what would the native Lua's io solve?
T
Timmy
GTNardy:
io.[open/close/write/...]
GTNardy
Timmy: yeah but what is the io library solving here?
T
Timmy
GTNardy: It's disabled by default if the server isn't started with --enable_unsafe_libs
GTNardy
Timmy: what you are saying is to only allow File to access files external to that package when running with --enable_unsafe_libs?
T
Timmy
GTNardy: First my idea was to rely on
io
+ the command line in these cases, but what you said seems like a good alternative