From 91ab10084a5b5c8b9fed4bdd589b6db008c4af11 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 4 Nov 2022 19:45:29 +0000 Subject: [PATCH] Make error reproducible with sleep() --- src/authres.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/authres.rs b/src/authres.rs index 51f7eb9fa..d1a31636f 100644 --- a/src/authres.rs +++ b/src/authres.rs @@ -666,6 +666,10 @@ Authentication-Results: box.hispanilandia.net; spf=pass smtp.mailfrom=adbenitez@ tcm.section("An attacker, bob2, sends a from-forged email to Alice!"); + // Sleep to make sure key reset is ignored because of DKIM failure + // and not because reordering is suspected. + tokio::time::sleep(std::time::Duration::from_millis(1100)).await; + let bob2 = tcm.unconfigured().await; bob2.configure_addr("bob@example.net").await; e2ee::ensure_secret_key_exists(&bob2).await?;