Projects tigase _server server-core Issues #232
Exception in Sasl Authentication when do Load Test Tigase Server with TSung (#232)
Closed
Artur Hefczyc opened 1 decade ago

I got the exception

java.lang.NullPointerException
at tigase.xmpp.impl.SaslAuth.process(SaslAuth.java)
at tigase.server.xmppsession.SessionManager$ProcessorWorkerThread.process(SessionManager.java)
at tigase.util.WorkerThread.run(WorkerThread.java)

I used the version tigase-issue #5.2.0-beta1-b3182.jar in https://projects.tigase.org/projects/tigase-server/files) also had this issue when I tested with Sasl Authentication

The issue code in class SaslAuth.java in the lines:

Collection<String> allowedMechanisms = (Collection<String>) session.getSessionData(ALLOWED_SASL_MECHANISMS_KEY);
session.removeSessionData(ALLOWED_SASL_MECHANISMS_KEY);
if ((mechanismName  null) || !allowedMechanisms.contains(mechanismName)) {
  throw new XmppSaslException(SaslError.invalid_mechanism, "Mechanism '" + mechanismName + "' is not allowed");
}

The "allowedMechanisms" is null. When I tried to comment out the lines:

session.removeSessionData(ALLOWED_SASL_MECHANISMS_KEY);
if ((mechanismName  null) || !allowedMechanisms.contains(mechanismName)) {
  throw new XmppSaslException(SaslError.invalid_mechanism, "Mechanism '" + mechanismName + "' is not allowed");
}

When I tried to test with 5k connections, I did not have this issue.

The server must not show exceptions. The exception has to be caught and appropriate error message should be displayed.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
1538
Version
tigase-server-5.2.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#232
Please wait...
Page is in error, reload to recover