aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-06-25 12:26:35 +0100
committerGitHub <noreply@github.com>2021-06-25 12:26:35 +0100
commitdd17376222b450562390c1a90f0694d31373a857 (patch)
tree143130acc00734ab50e9edbbdfb2d4cfeca9d742 /test
parentf8351d7aa84a526dfb8ac92fec9894f51e2a6359 (diff)
parent8d22202dc96475a497dfb68279e61d349314c340 (diff)
downloadrspamd-dd17376222b450562390c1a90f0694d31373a857.tar.gz
rspamd-dd17376222b450562390c1a90f0694d31373a857.zip
Merge pull request #3804 from fatalbanana/bitcoin_pcre
[Fix] Fix an edge case in BITCOIN_ADDR rule
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/001_merged/280_rules.robot6
-rw-r--r--test/functional/messages/btc4.eml26
2 files changed, 32 insertions, 0 deletions
diff --git a/test/functional/cases/001_merged/280_rules.robot b/test/functional/cases/001_merged/280_rules.robot
index 52ea1c86d..2ae2f7422 100644
--- a/test/functional/cases/001_merged/280_rules.robot
+++ b/test/functional/cases/001_merged/280_rules.robot
@@ -66,6 +66,12 @@ BITCOIN ADDR 3
... Settings={symbols_enabled = [BITCOIN_ADDR]}
Expect Symbol BITCOIN_ADDR
+BITCOIN ADDR 4
+ Scan File ${RSPAMD_TESTDIR}/messages/btc4.eml
+ ... Settings={symbols_enabled = [BITCOIN_ADDR]}
+ Expect Symbol With Exact Options BITCOIN_ADDR 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
+ ... bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq bitcoincash:qztslqhavnjcgth9zwu6dw0jjcfy4zahfy7vf0smwp
+
RCVD_COUNT_ONE
Scan File ${RSPAMD_TESTDIR}/messages/btc.eml
... Settings={symbols_enabled = [RCVD_COUNT_ONE]}
diff --git a/test/functional/messages/btc4.eml b/test/functional/messages/btc4.eml
new file mode 100644
index 000000000..523ce592f
--- /dev/null
+++ b/test/functional/messages/btc4.eml
@@ -0,0 +1,26 @@
+Received: by mail-lf1-f54.gulugulu.com with SMTP id j14so14439709lfg.9
+ for <test@test.ru>; Mon, 27 Apr 2020 09:54:21 -0700 (PDT)
+From: test@test.com
+Date: Mon, 27 Apr 2020 19:54:10 +0300
+Message-ID: <CA+1S=h4aGimA6vSBJF=t1F+5z-Mua5+Cimf+NU_NDWJk8ZNOcw@mail.gmail.com>
+Subject: Fwd:
+To: <test@test.ru>
+Content-Type: multipart/alternative; boundary="00000000000004de7805a4489190"
+
+--0000000000004bee6805a4484c02
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
+bitcoincash:qztslqhavnjcgth9zwu6dw0jjcfy4zahfy7vf0smwp
+1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
+
+--0000000000004bee6805a4484c02
+Content-Type: text/html; charset="UTF-8"
+Content-Transfer-Encoding: 8bit
+
+bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
+bitcoincash:qztslqhavnjcgth9zwu6dw0jjcfy4zahfy7vf0smwp
+1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2
+
+--0000000000004bee6805a4484c02--