Browse Source

[Fix] Fix text splitting: stack overflow (too many captures)

MFH: rspamd-1.6
tags/1.7.0
Vsevolod Stakhov 6 years ago
parent
commit
a55f3e05b6
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/plugins/lua/phishing.lua

+ 2
- 2
src/plugins/lua/phishing.lua View File

@@ -248,8 +248,8 @@ end
local function rspamd_str_split_fun(s, sep, func)
local lpeg = require "lpeg"
sep = lpeg.P(sep)
local elem = lpeg.C((1 - sep)^0 / func)
local p = lpeg.C(elem * (sep * elem)^0) -- make a table capture
local elem = lpeg.P((1 - sep)^0 / func)
local p = lpeg.P(elem * (sep * elem)^0)
return p:match(s)
end


Loading…
Cancel
Save