Commit d4c2e12b authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1092: PLAIN does not allow anonymous.

parent df58abfb
...@@ -55,7 +55,7 @@ public class SaslServerFactoryImpl implements SaslServerFactory ...@@ -55,7 +55,7 @@ public class SaslServerFactoryImpl implements SaslServerFactory
public SaslServerFactoryImpl() public SaslServerFactoryImpl()
{ {
allMechanisms = new HashSet<>(); allMechanisms = new HashSet<>();
allMechanisms.add( new Mechanism( "PLAIN", true, true ) ); allMechanisms.add( new Mechanism( "PLAIN", false, true ) );
allMechanisms.add( new Mechanism( "SCRAM-SHA-1", false, false ) ); allMechanisms.add( new Mechanism( "SCRAM-SHA-1", false, false ) );
allMechanisms.add( new Mechanism( "JIVE-SHAREDSECRET", true, false ) ); allMechanisms.add( new Mechanism( "JIVE-SHAREDSECRET", true, false ) );
allMechanisms.add( new Mechanism( "EXTERNAL", false, false ) ); allMechanisms.add( new Mechanism( "EXTERNAL", false, false ) );
...@@ -73,7 +73,7 @@ public class SaslServerFactoryImpl implements SaslServerFactory ...@@ -73,7 +73,7 @@ public class SaslServerFactoryImpl implements SaslServerFactory
switch ( mechanism.toUpperCase() ) switch ( mechanism.toUpperCase() )
{ {
case "PLAIN": case "PLAIN":
if ( cbh != null ) if ( cbh == null )
{ {
Log.debug( "Unable to instantiate {} SaslServer: A callbackHandler with support for Password, Name, and AuthorizeCallback required.", mechanism ); Log.debug( "Unable to instantiate {} SaslServer: A callbackHandler with support for Password, Name, and AuthorizeCallback required.", mechanism );
return null; return null;
......
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