Commit afb48c6c authored by Oran Agra's avatar Oran Agra
Browse files

Whitelist Lua print function to avoid breaking change in old releases

parent 7fddebc2
......@@ -87,6 +87,7 @@ static char *lua_builtins_allow_list[] = {
"setfenv",
"load",
"error",
"print", /* should be blocked, but kept in old releases to avoid breaking change. */
NULL,
};
......@@ -126,7 +127,6 @@ static char **allow_lists[] = {
static char *deny_list[] = {
"dofile",
"loadfile",
"print",
NULL,
};
......
......@@ -687,14 +687,14 @@ start_server {tags {"scripting"}} {
set _ $e
} {*Script attempted to access nonexistent global variable 'dofile'*}
test "Test print are not available" {
test "Test print is available to avoid breaking change" {
catch {
r eval {
print('some data')
} 0
} e
set _ $e
} {*Script attempted to access nonexistent global variable 'print'*}
} {}
test {Script return recursive object} {
r readraw 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment