mirror of
https://github.com/chatmail/core.git
synced 2026-04-21 07:26:29 +03:00
fix: do not send Secure-Join-Group in vg-request
Secure-Join-Group is only expected by old core in vg-request-with-auth. There is no reason to leak group ID in unencrypted vg-request. Besides that, Secure-Join-Group is deprecated as Alice knows Group ID corresponding to the auth code, so the header can be removed completely eventually.
This commit is contained in:
@@ -1125,6 +1125,14 @@ mod tests {
|
||||
assert_eq!(msg.get_header(HeaderDef::SecureJoin).unwrap(), "vg-request");
|
||||
assert!(msg.get_header(HeaderDef::SecureJoinInvitenumber).is_some());
|
||||
|
||||
// Old Delta Chat core sent `Secure-Join-Group` header in `vg-request`,
|
||||
// but it was only used by Alice in `vg-request-with-auth`.
|
||||
// New Delta Chat versions do not use `Secure-Join-Group` header at all
|
||||
// and it is deprecated.
|
||||
// Now `Secure-Join-Group` header
|
||||
// is only sent in `vg-request-with-auth` for compatibility.
|
||||
assert!(msg.get_header(HeaderDef::SecureJoinGroup).is_none());
|
||||
|
||||
// Step 3: Alice receives vg-request, sends vg-auth-required
|
||||
alice.recv_msg(&sent).await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user