mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 01:20:50 +00:00
Use Lua tostring() before concatenation.
This commit is contained in:
parent
3cd4ad267c
commit
3a02140415
@ -437,7 +437,7 @@ void scriptingEnableGlobalsProtection(lua_State *lua) {
|
|||||||
s[j++]="end\n";
|
s[j++]="end\n";
|
||||||
s[j++]="mt.__index = function (t, n)\n";
|
s[j++]="mt.__index = function (t, n)\n";
|
||||||
s[j++]=" if debug.getinfo(2) and debug.getinfo(2, \"S\").what ~= \"C\" then\n";
|
s[j++]=" if debug.getinfo(2) and debug.getinfo(2, \"S\").what ~= \"C\" then\n";
|
||||||
s[j++]=" error(\"Script attempted to access unexisting global variable '\"..n..\"'\", 2)\n";
|
s[j++]=" error(\"Script attempted to access unexisting global variable '\"..tostring(n)..\"'\", 2)\n";
|
||||||
s[j++]=" end\n";
|
s[j++]=" end\n";
|
||||||
s[j++]=" return rawget(t, n)\n";
|
s[j++]=" return rawget(t, n)\n";
|
||||||
s[j++]="end\n";
|
s[j++]="end\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user