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

Fixed padding of null responses. JM-627

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3714 b35dd754-fafc-0310-a699-88a17e54d16e
parent 8591b086
......@@ -338,9 +338,13 @@ public class SASLAuthentication {
private void sendChallenge(byte[] challenge) {
StringBuilder reply = new StringBuilder(250);
String challenge_b64 = StringUtils.encodeBase64(challenge).trim();
if ("".equals(challenge_b64)) {
challenge_b64 = "="; // Must be padded if null
}
reply.append(
"<challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
reply.append(StringUtils.encodeBase64(challenge).trim());
reply.append(challenge_b64);
reply.append("</challenge>");
connection.deliverRawText(reply.toString());
}
......
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