Mercurial > prosody-hg
diff util/sasl/plain.lua @ 2210:78c9b5255b27
Adding some human readable error messages.
| author | Tobias Markmann <tm@ayena.de> |
|---|---|
| date | Thu, 19 Nov 2009 17:17:52 +0100 |
| parents | adbedc32d41b |
| children | 98a2bc275e0e |
line wrap: on
line diff
--- a/util/sasl/plain.lua Thu Nov 19 17:08:58 2009 +0100 +++ b/util/sasl/plain.lua Thu Nov 19 17:17:52 2009 +0100 @@ -35,7 +35,7 @@ if (not password) or (password == "") or (not authentication) or (authentication == "") then log("debug", "Username or password violates SASLprep."); - return "failure", "malformed-request"; + return "failure", "malformed-request", "Invalid username or password."; end local correct, state = false, false; @@ -55,7 +55,7 @@ if correct then return "success"; else - return "failure", "not-authorized"; + return "failure", "not-authorized", "Unable to authorize you with the authentication credentials you've sent."; end end
