Commit fcd938c5 authored by guus's avatar guus

OF-673: Initiating s2s stream must have a 'from' attribute.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13664 b35dd754-fafc-0310-a699-88a17e54d16e
parent a2f51487
...@@ -253,6 +253,8 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing ...@@ -253,6 +253,8 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing
*/ */
private static LocalOutgoingServerSession createOutgoingSession(String domain, String hostname, private static LocalOutgoingServerSession createOutgoingSession(String domain, String hostname,
int port) { int port) {
String localDomainName = XMPPServer.getInstance().getServerInfo().getXMPPDomain();
boolean useTLS = JiveGlobals.getBooleanProperty("xmpp.server.tls.enabled", true); boolean useTLS = JiveGlobals.getBooleanProperty("xmpp.server.tls.enabled", true);
RemoteServerConfiguration configuration = RemoteServerManager.getConfiguration(hostname); RemoteServerConfiguration configuration = RemoteServerManager.getConfiguration(hostname);
if (configuration != null) { if (configuration != null) {
...@@ -309,6 +311,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing ...@@ -309,6 +311,7 @@ public class LocalOutgoingServerSession extends LocalSession implements Outgoing
openingStream.append(" xmlns:db=\"jabber:server:dialback\""); openingStream.append(" xmlns:db=\"jabber:server:dialback\"");
openingStream.append(" xmlns:stream=\"http://etherx.jabber.org/streams\""); openingStream.append(" xmlns:stream=\"http://etherx.jabber.org/streams\"");
openingStream.append(" xmlns=\"jabber:server\""); openingStream.append(" xmlns=\"jabber:server\"");
openingStream.append(" from=\"").append(localDomainName).append("\""); // OF-673
openingStream.append(" to=\"").append(hostname).append("\""); openingStream.append(" to=\"").append(hostname).append("\"");
openingStream.append(" version=\"1.0\">"); openingStream.append(" version=\"1.0\">");
connection.deliverRawText(openingStream.toString()); connection.deliverRawText(openingStream.toString());
......
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