Merge pull request #19 from mt-sane/patch-2

Fixed security issues. Open files read only.
pull/21/head
Brandon 2015-08-22 10:20:13 -05:00
commit b8b963b003
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
skins.meta = {}
for _, i in ipairs(skins.list) do
skins.meta[i] = {}
local f = io.open(skins.modpath.."/meta/"..i..".txt")
local f = io.open(skins.modpath.."/meta/"..i..".txt", "r")
local data = nil
if f then
data = minetest.deserialize("return {"..f:read('*all').."}")