Commit d29034d0 authored by Dave Cridland's avatar Dave Cridland

Merge pull request #279 from TFyre/master

Fixed Kerberos SSO Challenge Response
parents 8a554d83 c9653b01
...@@ -275,7 +275,7 @@ public class SASLAuthentication { ...@@ -275,7 +275,7 @@ public class SASLAuthentication {
props.put(Sasl.SERVER_AUTH, "TRUE"); props.put(Sasl.SERVER_AUTH, "TRUE");
} }
SaslServer ss = Sasl.createSaslServer(mechanism, "xmpp", SaslServer ss = Sasl.createSaslServer(mechanism, "xmpp",
session.getServerName(), props, JiveGlobals.getProperty("xmpp.fqdn", session.getServerName()), props,
new XMPPCallbackHandler()); new XMPPCallbackHandler());
if (ss == null) { if (ss == null) {
...@@ -343,10 +343,12 @@ public class SASLAuthentication { ...@@ -343,10 +343,12 @@ public class SASLAuthentication {
if (ss != null) { if (ss != null) {
boolean ssComplete = ss.isComplete(); boolean ssComplete = ss.isComplete();
String response = doc.getTextTrim(); String response = doc.getTextTrim();
if (response.length() > 0) {
if (!BASE64_ENCODED.matcher(response).matches()) { if (!BASE64_ENCODED.matcher(response).matches()) {
authenticationFailed(session, Failure.INCORRECT_ENCODING); authenticationFailed(session, Failure.INCORRECT_ENCODING);
return Status.failed; return Status.failed;
} }
}
try { try {
if (ssComplete) { if (ssComplete) {
authenticationSuccessful(session, ss.getAuthorizationID(), authenticationSuccessful(session, ss.getAuthorizationID(),
......
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