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
1 changed files with 4 additions and 0 deletions

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]);
}