Fix security vulnerability

This commit is contained in:
mid 2024-09-07 09:53:51 +03:00
parent d368fb8bc0
commit f67346231d

View File

@ -192,9 +192,9 @@ local handler = function(req, res)
local succ, val
if _ENV then
succ, val = xpcall(Lyre.render, debug.traceback, tmpl, env)
succ, val = xpcall(Lyre.render, debug.traceback, tmpl, env, true)
else
succ, val = pcall(Lyre.render, tmpl, env)
succ, val = pcall(Lyre.render, tmpl, env, true)
end
if succ then