Fixed security issues.
Opening *rw* is not required and causes security issues when using *secure.enable_security = true* in *minetest.config*pull/18/head
parent
6f7bee39e9
commit
e0bdda79ae
|
@ -7,7 +7,7 @@ local id
|
||||||
|
|
||||||
id = 1
|
id = 1
|
||||||
while true do
|
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
|
if (not f) then break end
|
||||||
f:close()
|
f:close()
|
||||||
skins.add("player_"..id)
|
skins.add("player_"..id)
|
||||||
|
@ -16,7 +16,7 @@ end
|
||||||
|
|
||||||
id = 1
|
id = 1
|
||||||
while true do
|
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
|
if (not f) then break end
|
||||||
f:close()
|
f:close()
|
||||||
skins.add("character_"..id)
|
skins.add("character_"..id)
|
||||||
|
|
Loading…
Reference in New Issue