DIGEST-MD5 challenge/response parsing must handle linear white spaces after the comma
Description
From #smack:
2015-03-31 00:54:34 Pursuit anywho, has anyone tried connecting to a jabberd2 server? I get nonce errors with digest-md5 and I think it's due to the challenge parsing logic 2015-03-31 00:56:05 Pursuit The challenge that jabberd is sending looks like ...", nonce="gNqCRQs6PgY46LbZ/hQ7sw==", qop=" and I think the spaces are throwing it off 2015-03-31 00:57:02 Pursuit since all it's doing is splitting it on ",", the key for each field will have a space in front, and not get matched by the if ("nonce".equals(key))... checks
From RFC 2831
#rule A construct "#" is defined, similar to "*", for defining lists of elements. 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)
Seems like a good placed trim() should do the trick
From #smack:
From RFC 2831
Seems like a good placed trim() should do the trick