1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 12:37:58 +01:00

Allow null username (mainly for SASL EXTERNAL)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
This commit is contained in:
Daniele Ricci 2014-08-12 19:15:01 +02:00 committed by Florian Schmaus
parent 7436a16d09
commit 613da7b9ff

View file

@ -254,7 +254,9 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
throw new AlreadyLoggedInException();
}
// Do partial version of nameprep on the username.
username = username.toLowerCase(Locale.US).trim();
if (username != null) {
username = username.toLowerCase(Locale.US).trim();
}
if (saslAuthentication.hasNonAnonymousAuthentication()) {
// Authenticate using SASL