Commit 62a64a25 authored by Guus der Kinderen's avatar Guus der Kinderen Committed by daryl herzmann

OF-477: SASL realm should be XMPP domain. (#591)

parent d0f20e90
......@@ -29,6 +29,7 @@ import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.sasl.AuthorizeCallback;
import javax.security.sasl.RealmCallback;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.auth.AuthFactory;
import org.jivesoftware.openfire.auth.AuthToken;
import org.jivesoftware.openfire.auth.AuthorizationManager;
......@@ -66,11 +67,7 @@ public class XMPPCallbackHandler implements CallbackHandler {
for (Callback callback : callbacks) {
if (callback instanceof RealmCallback) {
realm = ((RealmCallback) callback).getText();
if (realm == null) {
realm = ((RealmCallback) callback).getDefaultText();
}
//Log.debug("XMPPCallbackHandler: RealmCallback: " + realm);
((RealmCallback) callback).setText( XMPPServer.getInstance().getServerInfo().getXMPPDomain() );
}
else if (callback instanceof NameCallback) {
name = ((NameCallback) callback).getName();
......
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