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:
parent
46ef8c793b
commit
a53f4da70f
1 changed files with 3 additions and 1 deletions
|
@ -239,7 +239,7 @@ public class XMPPConnection {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs in to the server using the strongest authentication mode supported by
|
* 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
|
* elapses in each step of the authentication process without a response from
|
||||||
* the server, or if an error occurs, a XMPPException will be thrown.
|
* the server, or if an error occurs, a XMPPException will be thrown.
|
||||||
*
|
*
|
||||||
|
@ -258,6 +258,8 @@ public class XMPPConnection {
|
||||||
if (authenticated) {
|
if (authenticated) {
|
||||||
throw new IllegalStateException("Already logged in to server.");
|
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,
|
// If we send an authentication packet in "get" mode with just the username,
|
||||||
// the server will return the list of authentication protocols it supports.
|
// the server will return the list of authentication protocols it supports.
|
||||||
Authentication discoveryAuth = new Authentication();
|
Authentication discoveryAuth = new Authentication();
|
||||||
|
|
Loading…
Reference in a new issue