Skip to content

Commit

Permalink
feat(sdk): improve luascript performance (#6138)
Browse files Browse the repository at this point in the history
Signed-off-by: francois  samin <[email protected]>
  • Loading branch information
fsamin authored Apr 6, 2022
1 parent 58d4233 commit d9edaeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/luascript/luascript.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func NewCheck() (*Check, error) {
state.PreloadModule("json", luajson.Loader)

// Sandboxing lua engine
if err := state.DoString("coroutine=nil;debug=nil;io=nil;open=nil;os.rename=nil;os.remove=nil;os.exit=nil;os.clock=nil;os.execute=nil;os.getenv=nil;os.setlocale=nil;os.tmpname=nil"); err != nil {
if err := state.DoString("coroutine=nil;debug=nil;io=nil;open=nil;dofile=nil;loadfile=nil;getfenv=nil;print=nil;pcall=nil;os.rename=nil;os.remove=nil;os.exit=nil;os.clock=nil;os.execute=nil;os.getenv=nil;os.setlocale=nil;os.tmpname=nil"); err != nil {
return nil, err
}

Expand Down

0 comments on commit d9edaeb

Please sign in to comment.