Merge pull request #18 from mt-sane/patch-1

Fixed security issues. Open files read only.
pull/21/head
Brandon 2015-08-22 10:19:46 -05:00
commit 85e278b56f
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ local id
id = 1
while true do
local f = io.open(minetest.get_modpath("skins").."/textures/player_"..id..".png")
local f = io.open(minetest.get_modpath("skins").."/textures/player_"..id..".png", "r")
if (not f) then break end
f:close()
skins.add("player_"..id)
@ -16,7 +16,7 @@ end
id = 1
while true do
local f = io.open(minetest.get_modpath("skins").."/textures/character_"..id..".png")
local f = io.open(minetest.get_modpath("skins").."/textures/character_"..id..".png", "r")
if (not f) then break end
f:close()
skins.add("character_"..id)