fix: do not compress SecureJoin messages

This commit is contained in:
link2xt
2024-02-09 11:14:06 +00:00
parent 3c4c701f9b
commit b970ebe67a
3 changed files with 31 additions and 16 deletions

View File

@@ -734,8 +734,12 @@ impl<'a> MimeFactory<'a> {
);
}
// Disable compression for SecureJoin to ensure
// there are no compression side channels
// leaking information about the tokens.
let compress = self.msg.param.get_cmd() != SystemMessage::SecurejoinMessage;
let encrypted = encrypt_helper
.encrypt(context, verified, message, peerstates)
.encrypt(context, verified, message, peerstates, compress)
.await?;
outer_message