mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix: ignore address case when comparing the To: field to Autocrypt-Gossip:
This commit is contained in:
@@ -1752,7 +1752,7 @@ async fn update_gossip_peerstates(
|
|||||||
.handle_fingerprint_change(context, message_time)
|
.handle_fingerprint_change(context, message_time)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
gossiped_addr.insert(header.addr.clone());
|
gossiped_addr.insert(header.addr.to_lowercase());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(gossiped_addr)
|
Ok(gossiped_addr)
|
||||||
|
|||||||
@@ -2211,7 +2211,7 @@ async fn check_verified_properties(
|
|||||||
let peerstate = Peerstate::from_addr(context, &to_addr).await?;
|
let peerstate = Peerstate::from_addr(context, &to_addr).await?;
|
||||||
|
|
||||||
// mark gossiped keys (if any) as verified
|
// 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 let Some(mut peerstate) = peerstate {
|
||||||
// if we're here, we know the gossip key is verified:
|
// if we're here, we know the gossip key is verified:
|
||||||
// - use the gossip-key as verified-key if there is no verified-key
|
// - use the gossip-key as verified-key if there is no verified-key
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ pub(crate) async fn observe_securejoin_on_other_device(
|
|||||||
let addr = Contact::load_from_db(context, contact_id)
|
let addr = Contact::load_from_db(context, contact_id)
|
||||||
.await?
|
.await?
|
||||||
.get_addr()
|
.get_addr()
|
||||||
.to_string();
|
.to_lowercase();
|
||||||
if mime_message.gossiped_addr.contains(&addr) {
|
if mime_message.gossiped_addr.contains(&addr) {
|
||||||
let mut peerstate = match Peerstate::from_addr(context, &addr).await? {
|
let mut peerstate = match Peerstate::from_addr(context, &addr).await? {
|
||||||
Some(p) => p,
|
Some(p) => p,
|
||||||
|
|||||||
Reference in New Issue
Block a user