From: Vsevolod Stakhov Date: Wed, 27 Nov 2019 13:22:18 +0000 (+0000) Subject: [Minor] Lua_content: Support javascript PDF elements X-Git-Tag: 2.3~291 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=daa76dc2e137c97d7329f553d708053f332ee95e;p=thirdparty%2Frspamd.git [Minor] Lua_content: Support javascript PDF elements --- diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua index 3ff9f0f64f..e8d4c7bab1 100644 --- a/lualib/lua_content/pdf.lua +++ b/lualib/lua_content/pdf.lua @@ -29,6 +29,12 @@ local pdf_patterns = { patterns = { [[\ntrailer\r?\n]] } + }, + javascript = { + patterns = { + [[\s/JS]], + [[\s/JavaScript]], + } } } @@ -128,6 +134,11 @@ processors.trailer = function(input, task, positions, output) end end +processors.javascript = function(_, task, _, output) + lua_util.debugm(N, task, "pdf: found javascript tag") + output.javascript = true +end + exports.process = process_pdf return exports \ No newline at end of file