commit 4ae8a27: [Minor] Use unicode property for currency detection

Vsevolod Stakhov vsevolod at rspamd.com
Sun Oct 30 08:35:04 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-10-29 21:43:51 +0100
URL: https://github.com/rspamd/rspamd/commit/4ae8a27cb173fc330cb0666085aadb21affa8337

[Minor] Use unicode property for currency detection
Issue: #4320

---
 rules/regexp/headers.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua
index 9a01426fc..e493a663e 100644
--- a/rules/regexp/headers.lua
+++ b/rules/regexp/headers.lua
@@ -865,7 +865,7 @@ reconf['SUBJECT_HAS_QUESTION'] = {
 }
 
 reconf['SUBJECT_HAS_CURRENCY'] = {
-  re = 'Subject=/[$€$¢¥₽]/Hu',
+  re = 'Subject=/\\p{Sc}/Hu',
   description = 'Subject contains currency',
   score = 1.0,
   group = 'headers'


More information about the Commits mailing list