fix scram crash for broken metronome servers

This commit is contained in:
Daniel Gultsch 2020-05-27 13:53:28 +02:00
parent 8f7ff2c3dd
commit 575ada3b27

View file

@ -195,6 +195,10 @@ abstract class ScramMechanism extends SaslMechanism {
final byte[] clientProof = new byte[keys.clientKey.length];
if (clientSignature.length < keys.clientKey.length) {
throw new AuthenticationException("client signature was shorter than clientKey");
}
for (int i = 0; i < clientProof.length; i++) {
clientProof[i] = (byte) (keys.clientKey[i] ^ clientSignature[i]);
}