浏览代码

Merge pull request #3894 from citrin/bitcoin-lua-opt

[Minor]  Skip bitcoin address check for very long words
tags/3.1
Vsevolod Stakhov 2 年前
父节点
当前提交
76a470911b
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4
    2
      rules/bitcoin.lua

+ 4
- 2
rules/bitcoin.lua 查看文件

@@ -184,7 +184,8 @@ config.regexp['BITCOIN_ADDR'] = {
re = string.format('(%s) + (%s) > 0', normal_wallet_re, btc_bleach_re),
re_conditions = {
[normal_wallet_re] = function(task, txt, s, e)
if e - s <= 2 then
local len = e - s
if len <= 2 or len > 1024 then
return false
end

@@ -205,7 +206,8 @@ config.regexp['BITCOIN_ADDR'] = {
end
end,
[btc_bleach_re] = function(task, txt, s, e)
if e - s <= 2 then
local len = e - s
if len <= 2 or len > 1024 then
return false
end


正在加载...
取消
保存