mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Merge branch '4.1'
Conflicts: version.gradle
This commit is contained in:
commit
4a16ab9329
4 changed files with 94 additions and 13 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue