Commit 12eaa6be authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

If auth request includes a value then validate it.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3489 b35dd754-fafc-0310-a699-88a17e54d16e
parent 29dcec78
......@@ -162,7 +162,16 @@ public class SASLAuthentication {
session.getServerName(), props,
new XMPPCallbackHandler());
// evaluateResponse doesn't like null parameter
byte[] challenge = ss.evaluateResponse(new byte[0]);
byte[] token = new byte[0];
if (doc.isTextOnly()) {
// If auth request includes a value then validate it
token = StringUtils.decodeBase64(doc.getText())
.getBytes(CHARSET);
if (token == null) {
token = new byte[0];
}
}
byte[] challenge = ss.evaluateResponse(token);
// Send the challenge
sendChallenge(challenge);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment