diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-04-12 12:35:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-04-12 12:35:08 +0100 |
commit | 64772cf0e77038981f30f6310e048c0506a441d5 (patch) | |
tree | 7e4c11d4d09be0f9b2f253f6d56ef7853e192d1e /rules/regexp | |
parent | 2219a8e09fba415759e06279ebe4f044c42ae4ba (diff) | |
download | rspamd-64772cf0e77038981f30f6310e048c0506a441d5.tar.gz rspamd-64772cf0e77038981f30f6310e048c0506a441d5.zip |
[Rules] Fix pay-to-hash addresses validation
Diffstat (limited to 'rules/regexp')
-rw-r--r-- | rules/regexp/misc.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rules/regexp/misc.lua b/rules/regexp/misc.lua index d5dac650e..2076c78fa 100644 --- a/rules/regexp/misc.lua +++ b/rules/regexp/misc.lua @@ -130,10 +130,10 @@ local id = rspamd_config:register_symbol{ local acc = base58_dec[ch] or 0 for i=25,1,-1 do acc = acc + (58 * bytes[i]); - bytes[i] = math.fmod(acc, 256); - acc = math.modf(acc / 256); + bytes[i] = acc % 256 + acc = math.floor(acc / 256); end - end, fun.tail(word)) -- Tail due to first byte is version + end, word) -- Now create a validation tag local sha256 = hash.create_specific('sha256') for i=1,21 do |