[jdev] Strange Smack SASL response encoding implementation
Florian Schmaus
flo at freakempire.de
Fri Oct 12 06:56:23 UTC 2012
On 12.10.2012 03:30, Tomasz Sterna wrote:
> Hello.
>
> Does anyone have an idea, why Smack (the Java client library) is
> producing these invalid challenge response:
>
> <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">=</response>
>
> Notice the single = character in place of empty data.
> Single = character is invalid Base64 data and it prevents SMACK logging
> in my server on invalid-encoding error.
>
> There is an explicit code in Smack to implement this violation:
>
> authenticationText = Base64.encodeBytes(response,Base64.DONT_BREAK_LINES);
> if(authenticationText.equals("")) {
> authenticationText = "=";
> }
I don't see that code part in the current trunk of Smack's SASLMechanism
class [1]. But the problem reminds me of SMACK-324.
- Florian
[1]
http://fisheye.igniterealtime.org/browse/smack/trunk/source/org/jivesoftware/smack/sasl/SASLMechanism.java?hb=true
[2] http://issues.igniterealtime.org/browse/SMACK-324
More information about the JDev
mailing list