Browse Source

[Rules] Fix pay-to-hash addresses validation

pull/2852/head
Vsevolod Stakhov 7 years ago
parent
commit
64772cf0e7
  1. 6
      rules/regexp/misc.lua

6
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

Loading…
Cancel
Save