summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2026-01-07 19:19:44 +0100
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2026-01-07 19:19:44 +0100
commit1dd83cf7e527ff29d734f6a2c8f9b61d39b41d94 (patch)
treeda5185757a055488bdc9cbb7d17077a8f36596a9 /lua
parent1e2f270469c61337ef7f5f92ab93f691e5d86492 (diff)
Diffstat (limited to 'lua')
-rw-r--r--lua/lua_ucl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lua/lua_ucl.c b/lua/lua_ucl.c
index d6be69e42a71..40f7c780f9aa 100644
--- a/lua/lua_ucl.c
+++ b/lua/lua_ucl.c
@@ -648,7 +648,13 @@ static int
lua_ucl_parser_init (lua_State *L)
{
struct ucl_parser *parser, **pparser;
- int flags = UCL_PARSER_NO_FILEVARS;
+ /*
+ * We disable file variables and macros by default, as
+ * the most use cases are parsing of JSON and not of the real
+ * files. Macros in the parser are very dangerous and should be used
+ * for trusted data only.
+ */
+ int flags = UCL_PARSER_NO_FILEVARS|UCL_PARSER_DISABLE_MACRO;
if (lua_gettop (L) >= 1) {
flags = lua_tonumber (L, 1);