Software / code / prosody-modules
Diff
mod_register_json/mod_register_json.lua @ 927:a9dfa7232d88
Merge
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 12 Mar 2013 12:10:25 +0000 |
| parent | 919:7d72fb45b1e4 |
line wrap: on
line diff
--- a/mod_register_json/mod_register_json.lua Thu Nov 22 18:59:10 2012 +0000 +++ b/mod_register_json/mod_register_json.lua Tue Mar 12 12:10:25 2013 +0000 @@ -69,7 +69,6 @@ return http_response(event, 400, "JSON Decoding failed.") else -- Decode JSON data and check that all bits are there else throw an error - req_body = json_decode(body) if req_body["username"] == nil or req_body["password"] == nil or req_body["host"] == nil or req_body["ip"] == nil then module:log("debug", "%s supplied an insufficent number of elements or wrong elements for the JSON registration", user) return http_response(event, 400, "Invalid syntax.") @@ -86,7 +85,7 @@ -- And nodeprep the username local username = nodeprep(req_body["username"]) if not username then - module:log("debug", "%s supplied an username containing invalid characters: %s", user, username) + module:log("debug", "An username containing invalid characters was supplied: %s", user) return http_response(event, 406, "Supplied username contains invalid characters, see RFC 6122.") else if not usermanager.user_exists(username, req_body["host"]) then