[exim-cvs] Testsuite: testcase for misordered ARC headers. B…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Testsuite: testcase for misordered ARC headers. Bug 2493
Gitweb: https://git.exim.org/exim.git/commitdiff/054ce030a60f22a1acc26c419907d276406080f9
Commit:     054ce030a60f22a1acc26c419907d276406080f9
Parent:     e9dfcfb7b87107c2a55441c93aa463f9ea7586e1
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu Dec 12 19:17:47 2019 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Thu Dec 12 19:23:04 2019 +0000


    Testsuite: testcase for misordered ARC headers.  Bug 2493
---
 test/confs/4563                      |  1 +
 test/confs/{4562 => 4565}            |  2 +-
 test/log/4563                        | 15 ++++++++
 test/log/{4562 => 4565}              |  0
 test/mail/4563.a                     | 39 ++++++++++++++++++++
 test/mail/{4562.a => 4565.a}         |  0
 test/scripts/4560-ARC/4563           | 69 ++++++++++++++++++++++++++++++++++++
 test/scripts/4560-ARC/{4562 => 4565} |  0
 8 files changed, 125 insertions(+), 1 deletion(-)


diff --git a/test/confs/4563 b/test/confs/4563
new file mode 120000
index 0000000..359a76c
--- /dev/null
+++ b/test/confs/4563
@@ -0,0 +1 @@
+4560
\ No newline at end of file
diff --git a/test/confs/4562 b/test/confs/4565
similarity index 97%
rename from test/confs/4562
rename to test/confs/4565
index 4360554..4e90606 100644
--- a/test/confs/4562
+++ b/test/confs/4565
@@ -1,4 +1,4 @@
-# Exim test configuration 4562
+# Exim test configuration 4565

 SERVER=
 VALUE=
diff --git a/test/log/4563 b/test/log/4563
new file mode 100644
index 0000000..930844b
--- /dev/null
+++ b/test/log/4563
@@ -0,0 +1,15 @@
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D
+1999-03-02 09:44:33 10HmaX-0005vi-00 arc_state:      <fail>
+1999-03-02 09:44:33 10HmaX-0005vi-00 domains:        <test.ex:test.ex>
+1999-03-02 09:44:33 10HmaX-0005vi-00 arc_oldest_pass <0>
+1999-03-02 09:44:33 10HmaX-0005vi-00 reason:         <AMS sig nonverify>
+1999-03-02 09:44:33 10HmaX-0005vi-00 lh_A-R:         < test.ex; arc=none>
+1999-03-02 09:44:33 10HmaX-0005vi-00 lh-ams:         < i=2; test.ex; arc=none: i=1; test.ex; arc=none>
+1999-03-02 09:44:33 10HmaX-0005vi-00 oldest-p-ams:   <>
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@??? H=(xxx) [127.0.0.1] P=smtp S=sss id=qwerty1234@??? for a@???
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaX-0005vi-00 => a <a@???> R=d1 T=tfile
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
diff --git a/test/log/4562 b/test/log/4565
similarity index 100%
rename from test/log/4562
rename to test/log/4565
diff --git a/test/mail/4563.a b/test/mail/4563.a
new file mode 100644
index 0000000..e4082a5
--- /dev/null
+++ b/test/mail/4563.a
@@ -0,0 +1,39 @@
+From CALLER@??? Tue Mar 02 09:44:33 1999
+Authentication-Results: test.ex;
+    arc=fail (i=2)(AMS sig nonverify) header.s=sel arc.oldest-pass=0 smtp.remote-ip=127.0.0.1
+Received: from [127.0.0.1] (helo=xxx)
+    by test.ex with smtp (Exim x.yz)
+    (envelope-from <CALLER@???>)
+    id 10HmaX-0005vi-00
+    for a@???; Tue, 2 Mar 1999 09:44:33 +0000
+ARC-Seal: i=2; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Seal: i=1; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Authentication-Results: i=2; test.ex; arc=none
+ARC-Authentication-Results: i=1; test.ex; arc=none
+Authentication-Results: test.ex; arc=none
+From: mrgus@???
+To: bakawolf@???
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+Message-ID: <qwerty1234@???>
+Subject: simple test
+
+This is a simple test.
+
diff --git a/test/mail/4562.a b/test/mail/4565.a
similarity index 100%
rename from test/mail/4562.a
rename to test/mail/4565.a
diff --git a/test/scripts/4560-ARC/4563 b/test/scripts/4560-ARC/4563
new file mode 100644
index 0000000..5aaf5fa
--- /dev/null
+++ b/test/scripts/4560-ARC/4563
@@ -0,0 +1,69 @@
+# ARC verify, misordered headers
+#
+exim -DSERVER=server -bd -oX PORT_D
+****
+#
+# This should fail signatures (manually added i=2 layer), but not crash.
+# It seems that Outlook.com is _sorting_ headers before transmission;
+# so it goes AS2 AS1 AMS2 AMS1 AAR2 AAR1.  We had a bug in assuming that
+# the end of a list held the AMD we'd just parsed, so when the end
+# hadn't had an AMS yet, we fullowed a null pointer.
+#
+# Mail original in aux-fixed/4560.msg1.txt
+# Sig generated by: perl aux-fixed/dkim/sign_arc.pl < aux-fixed/4560.msg1.txt
+client 127.0.0.1 PORT_D
+??? 220
+HELO xxx
+??? 250
+MAIL FROM:<CALLER@???>
+??? 250
+RCPT TO:<a@???>
+??? 250
+DATA
+??? 354
+ARC-Seal: i=2; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Seal: i=1; a=rsa-sha256; cv=none; d=test.ex; s=sel; t=1521752658; b=
+        xcIN0OEpAc3s8riODm31Q6JgmIECch3iVd1LXWwsypGpCY2UFFuo5HhCEf4a043q
+        YZ+zn/MbFFkvwIqleeQkJ7S5UcvfM8dv/V4YnwAe+JD8r79glh/FRq6uKlc0ixLS
+        CllJMwj98J1P1K9+gwmO5TrD1eTZV68caZj77P+X2kw=
+ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=test.ex;
+         h=from:to:date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1
+        Zg33U3QT+16kfV2eOTvMeiEis=; b=WgE+YWSm48w/P448gPlBBNCKt2SJ4gosPx
+        0JQ98aZJhun2RaVcUO3INc+kZv8YOijofMzFqJxVn1cgMjoU8/QSHIyyt40FzkQB
+        oSGmSrCjtRnzS8pbp491NX3kGuetidaWE5muPSdOystg6mm1rBnl9sqVrwaynCmr
+        fu2jTuUfw=
+ARC-Authentication-Results: i=2; test.ex; arc=none
+ARC-Authentication-Results: i=1; test.ex; arc=none
+Authentication-Results: test.ex; arc=none
+From: mrgus@???
+To: bakawolf@???
+Date: Thu, 19 Nov 2015 17:00:07 -0700
+Message-ID: <qwerty1234@???>
+Subject: simple test
+
+This is a simple test.
+.
+??? 250
+QUIT
+??? 221
+****
+exim -DSERVER=server -DNOTDAEMON -q
+****
+#
+#
+#
+#
+#
+#
+killdaemon
+no_stdout_check
+no_msglog_check
diff --git a/test/scripts/4560-ARC/4562 b/test/scripts/4560-ARC/4565
similarity index 100%
rename from test/scripts/4560-ARC/4562
rename to test/scripts/4560-ARC/4565