1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 22:12:05 +01:00

Lowercase username on authentication.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2417 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2004-11-15 08:08:23 +00:00 committed by matt
parent 46ef8c793b
commit a53f4da70f

View file

@ -239,7 +239,7 @@ public class XMPPConnection {
/**
* Logs in to the server using the strongest authentication mode supported by
* the server, then set our presence to available. If more than five seconds
* the server, then sets presence to available. If more than five seconds
* elapses in each step of the authentication process without a response from
* the server, or if an error occurs, a XMPPException will be thrown.
*
@ -258,6 +258,8 @@ public class XMPPConnection {
if (authenticated) {
throw new IllegalStateException("Already logged in to server.");
}
// Do partial version of nameprep on the username.
username = username.toLowerCase().trim();
// If we send an authentication packet in "get" mode with just the username,
// the server will return the list of authentication protocols it supports.
Authentication discoveryAuth = new Authentication();