]> source.dussan.org Git - rspamd.git/commit
[Minor] Limit CIDv1 detection to 128 bytes
authortwesterhever <40121680+twesterhever@users.noreply.github.com>
Sun, 6 Nov 2022 14:48:54 +0000 (14:48 +0000)
committerGitHub <noreply@github.com>
Sun, 6 Nov 2022 14:48:54 +0000 (14:48 +0000)
commit1f78100963b372ab1a9511e8595aa335d3facb82
tree8e1d62a942a110cfc7003b649ae9c1f969f6c8f2
parentac6d1a6566a4ecf3e4ff75c27047d1f9ef2f01d7
[Minor] Limit CIDv1 detection to 128 bytes

As requested by @vstakhov in https://github.com/rspamd/rspamd/pull/4310#pullrequestreview-1148226107, try to limit the performance impact of this regular expression. However, given that there does not seem to be a hard limit for CIDv1s in IPFS itself, using an hashing algorithm with large output my permit miscreants to get around this rule.
rules/regexp/misc.lua