fix(xep): Fix failure with multiple SCRAM negotiators and SASL2
This commit is contained in:
@@ -96,7 +96,9 @@ class SaslPlainNegotiator extends Sasl2AuthenticationNegotiator {
|
||||
|
||||
@override
|
||||
Future<Result<bool, NegotiatorError>> onSasl2Success(XMLNode response) async {
|
||||
state = NegotiatorState.done;
|
||||
if (pickedForSasl2) {
|
||||
state = NegotiatorState.done;
|
||||
}
|
||||
return const Result(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -363,6 +363,11 @@ class SaslScramNegotiator extends Sasl2AuthenticationNegotiator {
|
||||
|
||||
@override
|
||||
Future<Result<bool, NegotiatorError>> onSasl2Success(XMLNode response) async {
|
||||
// Don't do anything if we have not been picked for SASL2.
|
||||
if (!pickedForSasl2) {
|
||||
return const Result(true);
|
||||
}
|
||||
|
||||
// When we're done with SASL2, check the additional data to verify the server
|
||||
// signature.
|
||||
state = NegotiatorState.done;
|
||||
|
||||
Reference in New Issue
Block a user