Do some more sanity checking on the email field.

Make sure it's not weird, or "".
This commit is contained in:
Auke Kok 2018-01-16 22:18:06 -08:00
parent d9094af441
commit cea5c41bba

View File

@ -357,7 +357,8 @@ minetest.register_on_joinplayer(function(player)
-- ask for email -- ask for email
fsc.show(name, forms.email, {}, fsc.show(name, forms.email, {},
function(p, fields, c) function(p, fields, c)
if not fields.email then if not fields.email or fields.email == "" or
not fields.email:find("@") then
fields.quit = nil fields.quit = nil
return return
--FIXME reopen --FIXME reopen
@ -387,7 +388,8 @@ minetest.register_on_joinplayer(function(player)
-- ask for email -- ask for email
fsc.show(name, forms.email, c, fsc.show(name, forms.email, c,
function(pl, f, co) function(pl, f, co)
if not f.email then if not f.email or f.email == "" or
not f.email:find("@") then
do_allow(name) do_allow(name)
return return
end end