fix #615 -- like with c-core Chat-Version is left in unprotected headers because

it's eg used in server-filters for detecting DC messages
This commit is contained in:
holger krekel
2019-09-27 04:01:43 +02:00
parent 2b73fab913
commit f45ee2ab4d

View File

@@ -182,7 +182,8 @@ impl EncryptHelper {
let opt_field = (*field).fld_data.fld_optional_field;
if !opt_field.is_null() && !(*opt_field).fld_name.is_null() {
let fld_name = to_string_lossy((*opt_field).fld_name);
if fld_name.starts_with("Secure-Join") || fld_name.starts_with("Chat-")
if fld_name.starts_with("Secure-Join")
|| (fld_name.starts_with("Chat-") && fld_name != "Chat-Version")
{
move_to_encrypted = true;
}