diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-26 12:18:27 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-06-26 12:18:27 +0100 |
commit | a58c93ae7fe87956bb255c8561f591aa1a761203 (patch) | |
tree | 4bcc3971fe73d3d40f10e0478f16cf690fe09baf /lualib/lua_scanners/dcc.lua | |
parent | cddb4c7f18869c5a99cd0634c4dcea2e31b0940d (diff) | |
download | rspamd-a58c93ae7fe87956bb255c8561f591aa1a761203.tar.gz rspamd-a58c93ae7fe87956bb255c8561f591aa1a761203.zip |
[Minor] DCC: Unfold DCC header
Diffstat (limited to 'lualib/lua_scanners/dcc.lua')
-rw-r--r-- | lualib/lua_scanners/dcc.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lualib/lua_scanners/dcc.lua b/lualib/lua_scanners/dcc.lua index d1bec769b..9043391d2 100644 --- a/lualib/lua_scanners/dcc.lua +++ b/lualib/lua_scanners/dcc.lua @@ -126,11 +126,13 @@ local function dcc_check(task, content, digest, rule) else -- Parse the response if upstream then upstream:ok() end - local _,_,result,disposition,header = tostring(data):find("(.-)\n(.-)\n(.-)\n") + local _,_,result,disposition,header = tostring(data):find("(.-)\n(.-)\n(.-)$") lua_util.debugm(rule.name, task, 'DCC result=%1 disposition=%2 header="%3"', result, disposition, header) if header then + -- Unfold header + header = header:gsub('\r?\n%s*', ' ') local _,_,info = header:find("; (.-)$") if (result == 'R') then -- Reject |