mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 10:49:41 +02:00
Don't set SASL authid parameter to username (SMACK-371)
RFC4616 states that if the authorization identity (authzid) parameter is null, then it is derived from the authentication identity (authcid). Smack currently sets both, authzid and authcid, to the username, resulting in auth attempts of userid\0userid\0password instead of userid\0password Which are different users on most systems (e.g. Kerberos). We now set only SASLMechanism.authenticationId to username. The authenticate(String, CallbackHandler) method does now not longer receive the username, as it's send by the CallbackHandler.
This commit is contained in:
parent
f7fc38e1f4
commit
a7ec0338bc
5 changed files with 9 additions and 13 deletions
|
@ -235,8 +235,7 @@ public class TCPConnection extends Connection {
|
|||
response = saslAuthentication.authenticate(username, password, resource);
|
||||
}
|
||||
else {
|
||||
response = saslAuthentication
|
||||
.authenticate(username, resource, config.getCallbackHandler());
|
||||
response = saslAuthentication.authenticate(resource, config.getCallbackHandler());
|
||||
}
|
||||
} else {
|
||||
throw new XMPPException("No non-anonymous SASL authentication mechanism available");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue