summaryrefslogtreecommitdiff
path: root/test/confs/4002
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-08-31 15:37:40 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2022-08-31 15:57:29 +0100
commit4e9ed49f8f12eb331b29bd5b6dc3693c520fddc2 (patch)
treef8041218c4d3a259b1a5c5b72ad944424f40a922 /test/confs/4002
parent1072af868662ea8fec30454c2d62afdee24f2c8e (diff)
Fix $regex<n> use-after-free. Bug 2915
Diffstat (limited to 'test/confs/4002')
-rw-r--r--test/confs/400210
1 files changed, 10 insertions, 0 deletions
diff --git a/test/confs/4002 b/test/confs/4002
index d9a12a368..4578cc019 100644
--- a/test/confs/4002
+++ b/test/confs/4002
@@ -10,6 +10,7 @@ rfc1413_query_timeout = 0s
acl_smtp_rcpt = check_rcpt
acl_smtp_data = check_data
+acl_smtp_mime = check_mime
acl_not_smtp = check_data
@@ -20,6 +21,15 @@ begin acl
check_rcpt:
accept
+check_mime:
+ warn condition = ${if match{$mime_content_type}{text}}
+ mime_regex = \N(?s)([\w.+=-]+@\w[\w-]*\.[\w.-]+\w)\
+ (.+?([\w.+=-]+@\w[\w-]*\.[\w.-]+\w))?\
+ (.+?([\w.+=-]+@\w[\w-]*\.[\w.-]+\w))?\
+ (.+?([\w.+=-]+@\w[\w-]*\.[\w.-]+\w))?\
+ (.+?([\w.+=-]+@\w[\w-]*\.[\w.-]+\w))?\N
+ accept
+
check_data:
warn regex = \N(THIS\s((\w+)\s)?REGEX)\N
message = X-Regex: Regex matched <$regex1> <$regex3>