]> source.dussan.org Git - rspamd.git/commitdiff
[Rules] Micro-optimize X_PHP_EVAL 3838/head
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Thu, 5 Aug 2021 14:54:20 +0000 (15:54 +0100)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Thu, 5 Aug 2021 14:54:20 +0000 (15:54 +0100)
Remove /i flag from regexp string "eval()'d code" is always in
lower case. While here use long string format for readability.

rules/regexp/compromised_hosts.lua

index 97d80853e5197ab95bbaf57fb3da412abc76eab5..0a9a9f0aa69c55c4b07654d038f8ef3369dca119 100644 (file)
@@ -92,7 +92,7 @@ reconf['HAS_X_ANTIABUSE'] = {
 }
 
 reconf['X_PHP_EVAL'] = {
-  re = "X-PHP-Script=/eval\\(\\)\\'d/Hi || X-PHP-Originating-Script=/eval\\(\\)\\'d/Hi",
+  re = [[X-PHP-Script=/eval\(\)'d code/H || X-PHP-Originating-Script=/eval\(\)'d code/H]],
   description = "Message sent using eval'd PHP",
   score = 4.0,
   group = "compromised_hosts"