]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Regexp is case-insensitive, omit redundant characters
authortwesterhever <40121680+twesterhever@users.noreply.github.com>
Sun, 6 Nov 2022 17:49:52 +0000 (17:49 +0000)
committerGitHub <noreply@github.com>
Sun, 6 Nov 2022 17:49:52 +0000 (17:49 +0000)
rules/regexp/misc.lua

index 1304cd81abbbf743ece24cc65bbecdf4269b9553..66ba349963c3f80be63ff44a0ee5aec933dd515e 100644 (file)
@@ -106,7 +106,7 @@ rspamd_config:register_dependency('LEAKED_PASSWORD_SCAM', 'BITCOIN_ADDR')
 -- content identifier (CID), comprising of either "qm", followed by 44 alphanumerical
 -- characters (CIDv0), or a CIDv1 of an alphanumerical string of unspecified length,
 -- depending on the hash algorithm used, but starting with a multibase prefix.
-local ipfs_cid = '/(qm[a-z0-9]{44}|[079fFvVtTbBcChkKzZmMuUP][a-z0-9]{44,128})/{url}i'
+local ipfs_cid = '/(qm[a-z0-9]{44}|[079fvtbchkzmup][a-z0-9]{44,128})/{url}i'
 local ipfs_string = '/ipfs(\\.|-|_|\\/|\\?)/{url}i'
 reconf['HAS_IPFS_GATEWAY_URL'] = {
   description = 'Message contains InterPlanetary File System (IPFS) gateway URL, likely malicious',