Smack sends single equals sign ('=') as SASL response
Description
I have a little issue with this portion of code from SASLMechanism.java concerning the element
public String toXML() {
StringBuilder stanza = new StringBuilder();
stanza.append("<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
if (authenticationText != null) {
stanza.append(authenticationText);
}
else {
// the else case should be removed
stanza.append("=");
}
stanza.append("</response>");
return stanza.toString();
}
This codes send a '=' instead of an empty response element. '=' is not a valid base64 string. This is generally the last response of a challenge so many servers don't check the additional data but some like jabberd2 check it and send an incorrect-encoding failure. I attach the corresponding exchange.
I have a little issue with this portion of code from SASLMechanism.java concerning the element
public String toXML() { StringBuilder stanza = new StringBuilder(); stanza.append("<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">"); if (authenticationText != null) { stanza.append(authenticationText); } else { // the else case should be removed stanza.append("="); } stanza.append("</response>"); return stanza.toString(); }
This codes send a '=' instead of an empty response element. '=' is not a valid base64 string. This is generally the last response of a challenge so many servers don't check the additional data but some like jabberd2 check it and send an incorrect-encoding failure. I attach the corresponding exchange.