AnsweredAssumed Answered

Handle preceding whitespace in DIGEST-MD5

Question asked by Ana on May 5, 2015
Latest reply on May 5, 2015 by Flow

When will be available the version that fixes this bug? or what can I do until that occurs?


Now I get this error due to a whitespace in nonce about the RFC 2831 2.1.2 digest-response in evaluateChallenge method of SASLDigestMD5Mechanism:


org.jivesoftware.smack.SmackException: nonce value not present in initial challenge

            at org.jivesoftware.smack.sasl.provided.SASLDigestMD5Mechanism.evaluateChallenge(S

            at org.jivesoftware.smack.sasl.SASLMechanism.challengeReceived( 234)

            at org.jivesoftware.smack.SASLAuthentication.challengeReceived(SASLAuthentication. java:318)

            at org.jivesoftware.smack.SASLAuthentication.challengeReceived(SASLAuthentication. java:302)

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPC

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPCon

            at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$



I saw this bug is resolved in 4.2-alpha2 but when I tried to add it to my project manually there were a lot of errors of dependencies.


               // RFC 2831 § 7.1 about the formating of the digest-challenge:

                // "The full form is "<n>#<m>element" indicating at least <n> and

                // at most <m> elements, each separated by one or more commas

                // (",") and OPTIONAL linear white space (LWS)."

                // Which means the key value may be preceded by whitespace,

                // which is what we remove: *Only the preceding whitespace*.




Sorry for my english, thanks in advance.