]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Bitcoin: Another fix for bleach32 regexp
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 30 Mar 2021 15:44:32 +0000 (16:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 30 Mar 2021 15:44:32 +0000 (16:44 +0100)
rules/bitcoin.lua

index c14a84dc2dbf83b92f2c4d85ad501ea5ef5a03ec..56969536c2a65616d046c78a58d0d6455d90dcf1 100644 (file)
@@ -176,7 +176,7 @@ local function is_segwit_bech32_address(task, word)
 end
 
 local normal_wallet_re = [[/\b[13LM][1-9A-Za-z]{25,34}\b/AL{sa_body}]]
-local btc_bleach_re = [[/\b(?:[a-zA-Z]\w+:)?[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{14,}\b/AL{sa_body}]]
+local btc_bleach_re = [[/\b(?:(?:[a-zA-Z]\w+:)|(?:bc1))?[qpzry9x8gf2tvdw0s3jn54khce6mua7l]{14,}\b/AL{sa_body}]]
 
 config.regexp['BITCOIN_ADDR'] = {
   description = 'Message has a valid bitcoin wallet address',