Mercurial > prosody-modules
comparison mod_register_json/register_json/mod_register_json.lua @ 995:716a2b9cc18d
mod_register_json: fix logging message for already pending registrations' bounces.
| author | Marco Cirillo <maranda@lightwitch.org> |
|---|---|
| date | Sun, 05 May 2013 15:19:30 +0200 |
| parents | 794817421fc6 |
| children | 7dbde05b48a9 |
comparison
equal
deleted
inserted
replaced
| 994:487cd02aada0 | 995:716a2b9cc18d |
|---|---|
| 131 if not username then | 131 if not username then |
| 132 module:log("debug", "An username containing invalid characters was supplied: %s", req_body["username"]) | 132 module:log("debug", "An username containing invalid characters was supplied: %s", req_body["username"]) |
| 133 return http_response(event, 406, "Supplied username contains invalid characters, see RFC 6122.") | 133 return http_response(event, 406, "Supplied username contains invalid characters, see RFC 6122.") |
| 134 else | 134 else |
| 135 if pending_node[username] then | 135 if pending_node[username] then |
| 136 module:log("warn", "%s attempted to submit a registration request but another request for that user is pending") | 136 module:log("warn", "%s attempted to submit a registration request but another request for that user (%s) is pending", ip, username) |
| 137 return http_response(event, 401, "Another user registration by that username is pending.") | 137 return http_response(event, 401, "Another user registration by that username is pending.") |
| 138 end | 138 end |
| 139 | 139 |
| 140 if not usermanager.user_exists(username, module.host) then | 140 if not usermanager.user_exists(username, module.host) then |
| 141 -- if username fails to register successive requests shouldn't be throttled until one is successful. | 141 -- if username fails to register successive requests shouldn't be throttled until one is successful. |
