Commit d2551443 authored by Dave Cridland's avatar Dave Cridland

OF-1309 Do not try to piggyback on SASL authenticated sessions

parent daf92ff2
...@@ -129,6 +129,11 @@ public class LocalOutgoingServerSession extends LocalServerSession implements Ou ...@@ -129,6 +129,11 @@ public class LocalOutgoingServerSession extends LocalServerSession implements Ou
return false; return false;
} }
session = sessionManager.getOutgoingServerSession(remoteDomain); session = sessionManager.getOutgoingServerSession(remoteDomain);
if ( !session.isUsingServerDialback() )
{
log.debug( "Dialback was not used for '{}'. This session cannot be re-used.", remoteDomain );
session = null;
}
if (session == null) if (session == null)
{ {
...@@ -591,10 +596,10 @@ public class LocalOutgoingServerSession extends LocalServerSession implements Ou ...@@ -591,10 +596,10 @@ public class LocalOutgoingServerSession extends LocalServerSession implements Ou
@Override @Override
public boolean authenticateSubdomain(String localDomain, String remoteDomain) { public boolean authenticateSubdomain(String localDomain, String remoteDomain) {
if (!usingServerDialback) { if (!usingServerDialback) {
// Using SASL so just assume that the domain was validated /*
// (note: this may not be correct) * We cannot do this reliably; but this code should be unreachable.
addOutgoingDomainPair(localDomain, remoteDomain); */
return true; return false;
} }
ServerDialback method = new ServerDialback(getConnection(), localDomain); ServerDialback method = new ServerDialback(getConnection(), localDomain);
if (method.authenticateDomain(socketReader, localDomain, remoteDomain, getStreamID().getID())) { if (method.authenticateDomain(socketReader, localDomain, remoteDomain, getStreamID().getID())) {
......
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