mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-16 20:44:03 +00:00
Lua: Sandbox by default (whitelisted functions); Disable inline scripts for now; Add more checks for security reasons (#7136)
https://github.com/XTLS/Xray-core/pull/7136#issuecomment-6158632073 https://github.com/XTLS/Xray-core/pull/7136#issuecomment-6170831601 https://github.com/XTLS/Xray-core/pull/7136#issuecomment-6184362904
This commit is contained in:
+6
-2
@@ -175,9 +175,13 @@ func init() {
|
||||
switch v := input.(type) {
|
||||
case cmdarg.Arg:
|
||||
r, err := confloader.LoadConfig(v[0])
|
||||
common.Must(err)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
data, err := buf.ReadAllToBytes(r)
|
||||
common.Must(err)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return loadProtobufConfig(data)
|
||||
case io.Reader:
|
||||
data, err := buf.ReadAllToBytes(v)
|
||||
|
||||
Reference in New Issue
Block a user