comparison mod_register_json/register_json/mod_register_json.lua @ 992:794817421fc6

mod_register_json: added missing parameter to some http_response calls.
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 30 Apr 2013 01:12:26 +0200
parents 929dcf3c4bcb
children 716a2b9cc18d
comparison
equal deleted inserted replaced
991:929dcf3c4bcb 992:794817421fc6
115 return http_response(event, 401, "Auth token is invalid! The attempt has been logged.") 115 return http_response(event, 401, "Auth token is invalid! The attempt has been logged.")
116 else 116 else
117 -- Blacklist can be checked here. 117 -- Blacklist can be checked here.
118 if blacklist:contains(ip) then 118 if blacklist:contains(ip) then
119 module:log("warn", "Attempt of reg. submission to the JSON servlet from blacklisted address: %s", ip) 119 module:log("warn", "Attempt of reg. submission to the JSON servlet from blacklisted address: %s", ip)
120 return http_response(403, "The specified address is blacklisted, sorry.") 120 return http_response(event, 403, "The specified address is blacklisted, sorry.")
121 end 121 end
122 122
123 if not check_mail(mail) then 123 if not check_mail(mail) then
124 module:log("warn", "%s attempted to use a mail address (%s) matching one of the forbidden patterns.", ip, mail) 124 module:log("warn", "%s attempted to use a mail address (%s) matching one of the forbidden patterns.", ip, mail)
125 return http_response(403, "Requesting to register using this E-Mail address is forbidden, sorry.") 125 return http_response(event, 403, "Requesting to register using this E-Mail address is forbidden, sorry.")
126 end 126 end
127 127
128 -- We first check if the supplied username for registration is already there. 128 -- We first check if the supplied username for registration is already there.
129 -- And nodeprep the username 129 -- And nodeprep the username
130 username = nodeprep(username) 130 username = nodeprep(username)