Skip to content

Commit

Permalink
[Rules] Fix pay-to-hash addresses validation
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Apr 12, 2019
1 parent 2219a8e commit 64772cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rules/regexp/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 64772cf

Please sign in to comment.