]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not decomress encrypted streams when encryption is in xref
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 29 Jun 2020 13:43:40 +0000 (14:43 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 29 Jun 2020 13:43:40 +0000 (14:43 +0100)
lualib/lua_content/pdf.lua

index e47c21ef6db14b73804b5e35a6da1a663f9a0ad8..8b77213af08eee06d1b500eb77b386d1adee81fe 100644 (file)
@@ -1008,6 +1008,11 @@ local function postprocess_pdf_objects(task, input, pdf)
     end
     if obj.ref then
       parse_object_grammar(obj, task, pdf)
+
+      -- Special early handling
+      if obj.dict and obj.dict.Type and obj.dict.Type == 'XRef' then
+        process_xref(task, pdf, obj)
+      end
     end
   end