fix: ignore address case when comparing the To: field to Autocrypt-Gossip:

This commit is contained in:
link2xt
2023-06-07 16:26:53 +00:00
parent 437f8c48c4
commit 9ab9d2eb7b
3 changed files with 3 additions and 3 deletions

View File

@@ -1752,7 +1752,7 @@ async fn update_gossip_peerstates(
.handle_fingerprint_change(context, message_time)
.await?;
gossiped_addr.insert(header.addr.clone());
gossiped_addr.insert(header.addr.to_lowercase());
}
Ok(gossiped_addr)

View File

@@ -2211,7 +2211,7 @@ async fn check_verified_properties(
let peerstate = Peerstate::from_addr(context, &to_addr).await?;
// mark gossiped keys (if any) as verified
if mimeparser.gossiped_addr.contains(&to_addr) {
if mimeparser.gossiped_addr.contains(&to_addr.to_lowercase()) {
if let Some(mut peerstate) = peerstate {
// if we're here, we know the gossip key is verified:
// - use the gossip-key as verified-key if there is no verified-key

View File

@@ -583,7 +583,7 @@ pub(crate) async fn observe_securejoin_on_other_device(
let addr = Contact::load_from_db(context, contact_id)
.await?
.get_addr()
.to_string();
.to_lowercase();
if mime_message.gossiped_addr.contains(&addr) {
let mut peerstate = match Peerstate::from_addr(context, &addr).await? {
Some(p) => p,