From c3966f501c5dbb495ca4ef8c044fac7049645594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6sters?= Date: Mon, 10 Jul 2023 23:10:27 +0200 Subject: [PATCH] fix: nheko e2ee verification bug --- src/api/client_server/keys.rs | 12 ------------ src/database/key_value/users.rs | 1 - 2 files changed, 13 deletions(-) diff --git a/src/api/client_server/keys.rs b/src/api/client_server/keys.rs index ba89ece0..21f71b6d 100644 --- a/src/api/client_server/keys.rs +++ b/src/api/client_server/keys.rs @@ -151,18 +151,6 @@ pub async fn upload_signatures_route( let key = serde_json::to_value(key) .map_err(|_| Error::BadRequest(ErrorKind::InvalidParam, "Invalid key JSON"))?; - let is_signed_key = match key.get("usage") { - Some(usage) => usage - .as_array() - .map(|usage| !usage.contains(&json!("master"))) - .unwrap_or(false), - None => true, - }; - - if !is_signed_key { - continue; - } - for signature in key .get("signatures") .ok_or(Error::BadRequest( diff --git a/src/database/key_value/users.rs b/src/database/key_value/users.rs index 1cabab0e..359a0724 100644 --- a/src/database/key_value/users.rs +++ b/src/database/key_value/users.rs @@ -592,7 +592,6 @@ impl service::users::Data for KeyValueDatabase { &serde_json::to_vec(&cross_signing_key).expect("CrossSigningKey::to_vec always works"), )?; - // TODO: Should we notify about this change? self.mark_device_key_update(target_id)?; Ok(())