Fixed security issues.

Opening *rw* is not required and causes security issues when using *secure.enable_security = true* in *minetest.config*
pull/18/head
Sane 2015-08-22 16:38:25 +02:00
parent 6f7bee39e9
commit e0bdda79ae
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)