Commit b0a0d6d4 authored by Hal Deadman's avatar Hal Deadman Committed by akrherz

fix EXTERNAL auth stackoverflow error

parent 85ce5c0d
......@@ -44,6 +44,8 @@ import org.jivesoftware.openfire.net.SASLAuthentication;
import org.jivesoftware.openfire.net.VirtualConnection;
import org.jivesoftware.openfire.session.LocalClientSession;
import org.jivesoftware.openfire.spi.ConnectionConfiguration;
import org.jivesoftware.openfire.spi.ConnectionManagerImpl;
import org.jivesoftware.openfire.spi.ConnectionType;
import org.jivesoftware.util.JiveConstants;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.TaskEngine;
......@@ -131,7 +133,7 @@ public class HttpSession extends LocalClientSession {
public HttpSession(PacketDeliverer backupDeliverer, String serverName, InetAddress address,
StreamID streamID, long rid, HttpConnection connection, Locale language) {
super(serverName, new HttpVirtualConnection(address), streamID, language);
super(serverName, new HttpVirtualConnection(address, ConnectionType.SOCKET_C2S), streamID, language);
this.isClosed = false;
this.lastActivity = System.currentTimeMillis();
this.lastRequestID = rid;
......@@ -1098,9 +1100,16 @@ public class HttpSession extends LocalClientSession {
private InetAddress address;
private ConnectionConfiguration configuration;
private ConnectionType connectionType;
public HttpVirtualConnection(InetAddress address) {
this.address = address;
this.connectionType = ConnectionType.SOCKET_C2S;
}
public HttpVirtualConnection(InetAddress address, ConnectionType connectionType) {
this.address = address;
this.connectionType = connectionType;
}
@Override
......@@ -1140,7 +1149,11 @@ public class HttpSession extends LocalClientSession {
@Override
public ConnectionConfiguration getConfiguration() {
return session.getConnection().getConfiguration();
if (configuration == null) {
final ConnectionManagerImpl connectionManager = ((ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager());
configuration = connectionManager.getListener( connectionType, true ).generateConnectionConfiguration();
}
return configuration;
}
@Override
......
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