aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-27 13:22:18 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-27 13:22:18 +0000
commitdaa76dc2e137c97d7329f553d708053f332ee95e (patch)
tree51602dc5025b7dd155d21d30c63bcadc5fb694e6
parenta6faa5b82d08a1894c5be15d15531497476ea5cb (diff)
downloadrspamd-daa76dc2e137c97d7329f553d708053f332ee95e.tar.gz
rspamd-daa76dc2e137c97d7329f553d708053f332ee95e.zip
[Minor] Lua_content: Support javascript PDF elements
-rw-r--r--lualib/lua_content/pdf.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/lualib/lua_content/pdf.lua b/lualib/lua_content/pdf.lua
index 3ff9f0f64..e8d4c7bab 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