Hi folks,

We have been able to use a lua script to call a set of lua scripts in following fashion, but it seems to break after v6.2.6 (and v7 as well):

local key = call_arg[1];

local result = _G["f_"..redis.call('HGET', ':registry', key)]();

(:registry is my script repository)

Basically we tried to run a script that executes a preloaded script based on parameters; it seems this feature is no longer working. Is there an alternative to call lua script from another lua script?

Thanks for the help in advance!

Comment From: sundb

Global table was forbidden to be written since https://github.com/redis/redis/commit/b2ce3719afe5440b010ab3f12d9ad35b79cee55a AFAIK, lua scripting should be reproducible, .i.e the same script should have the same results or effects. but share lua code that depends on another lua script break it.

Comment From: oranagra

maybe Redis Functions is what you should be looking into.

Comment From: MeirShpilraien

This was fixed (removed) on this PR: https://github.com/redis/redis/commit/21414ad4802659eeb3e81d20d86b437d3ab882dc It closes a security issue that can cause ACL bypass: https://github.com/redis/redis/security/advisories/GHSA-647m-2wmq-qmvq As @oranagra said, you should probably look at Redis Function that allows to share code between functions on the same library.

Comment From: islanderman

Thanks for the information. Will rewrite with function. Closing this issue.