Lift restrictions for date() function in atlatc
This commit is contained in:
parent
086b2c0fb0
commit
e5c4e8cc1f
@ -58,8 +58,14 @@ local function safe_print(t, ...)
|
|||||||
minetest.chat_send_all(str)
|
minetest.chat_send_all(str)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function safe_date()
|
local function safe_date(f, t)
|
||||||
return(os.date("*t",os.time()))
|
if not f then
|
||||||
|
-- fall back to old behavior
|
||||||
|
return(os.date("*t",os.time()))
|
||||||
|
else
|
||||||
|
--pass parameters
|
||||||
|
return os.date(f,t)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- string.rep(str, n) with a high value for n can be used to DoS
|
-- string.rep(str, n) with a high value for n can be used to DoS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user