Commit ac94aa92 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed SASL PLAIN problem with Pidgin. JM-1145

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9290 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5252d970
...@@ -15,12 +15,12 @@ import org.dom4j.DocumentHelper; ...@@ -15,12 +15,12 @@ import org.dom4j.DocumentHelper;
import org.dom4j.Element; import org.dom4j.Element;
import org.dom4j.Namespace; import org.dom4j.Namespace;
import org.dom4j.QName; import org.dom4j.QName;
import org.jivesoftware.openfire.Connection;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.auth.AuthorizationManager;
import org.jivesoftware.openfire.auth.AuthFactory; import org.jivesoftware.openfire.auth.AuthFactory;
import org.jivesoftware.openfire.auth.AuthToken; import org.jivesoftware.openfire.auth.AuthToken;
import org.jivesoftware.openfire.auth.AuthorizationManager;
import org.jivesoftware.openfire.session.*; import org.jivesoftware.openfire.session.*;
import org.jivesoftware.openfire.Connection;
import org.jivesoftware.util.CertificateManager; import org.jivesoftware.util.CertificateManager;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log; import org.jivesoftware.util.Log;
...@@ -213,9 +213,9 @@ public class SASLAuthentication { ...@@ -213,9 +213,9 @@ public class SASLAuthentication {
new XMPPCallbackHandler()); new XMPPCallbackHandler());
// evaluateResponse doesn't like null parameter // evaluateResponse doesn't like null parameter
byte[] token = new byte[0]; byte[] token = new byte[0];
if (doc.isTextOnly()) { if (!doc.getText().isEmpty()) {
// If auth request includes a value then validate it // If auth request includes a value then validate it
token = StringUtils.decodeBase64(doc.getTextTrim()); token = StringUtils.decodeBase64(doc.getText().trim());
if (token == null) { if (token == null) {
token = new byte[0]; token = new byte[0];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment