1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

Merge branch '4.1'

Conflicts:
	version.gradle
This commit is contained in:
Florian Schmaus 2015-04-12 18:26:21 +02:00
commit 4a16ab9329
4 changed files with 94 additions and 13 deletions

View file

@ -104,6 +104,13 @@ public class SASLDigestMD5Mechanism extends SASLMechanism {
String[] keyValue = part.split("=");
assert (keyValue.length == 2);
String key = keyValue[0];
// 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*.
key = key.replaceFirst("^\\s+", "");
String value = keyValue[1];
if ("nonce".equals(key)) {
if (nonce != null) {