Mercurial > prosody-modules
comparison mod_email_pass/mod_email_pass.lua @ 1345:c60e9943dcb9
Fix problem handling form input
author | Luis G.F <luisgf@gmail.com> |
---|---|
date | Thu, 13 Mar 2014 14:58:47 +0000 |
parents | 7dbde05b48a9 |
children |
comparison
equal
deleted
inserted
replaced
1344:47d3c1c8a176 | 1345:c60e9943dcb9 |
---|---|
223 tag("body"):text(message); | 223 tag("body"):text(message); |
224 module:send(msg); | 224 module:send(msg); |
225 end | 225 end |
226 | 226 |
227 function send_token_mail(form, origin) | 227 function send_token_mail(form, origin) |
228 local user, host, resource = jidutil.split(form.username); | 228 local prepped_username = nodeprep(form.username); |
229 local prepped_username = nodeprep(user); | |
230 local prepped_mail = form.email; | 229 local prepped_mail = form.email; |
231 local jid = prepped_username .. "@" .. host; | 230 local jid = prepped_username .. "@" .. module.host; |
232 | 231 |
233 if not prepped_username then | 232 if not prepped_username then |
234 return nil, "El usuario contiene caracteres incorrectos"; | 233 return nil, "El usuario contiene caracteres incorrectos"; |
235 end | 234 end |
236 if #prepped_username == 0 then | 235 if #prepped_username == 0 then |