Added test to verify loading Lua binary payload is not possible (#10583)

The tests verify that loading a binary payload to the Lua interpreter raises an error.
The Lua code modification was done here: fdf9d45509
which force the Lau interpreter to always use the text parser.
This commit is contained in:
Meir Shpilraien (Spielrein) 2022-04-17 15:28:50 +03:00 committed by GitHub
parent a9d5cfa99b
commit 789c94fece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -735,6 +735,12 @@ start_server {tags {"scripting"}} {
return redis.acl_check_cmd('invalid-cmd','arg')
} 0}
}
test "Binary code loading failed" {
assert_error {ERR *attempt to call a nil value*} {run_script {
return loadstring(string.dump(function() return 1 end))()
} 0}
}
}
# Start a new server since the last test in this stanza will kill the