https://bugs.freedesktop.org/show_bug.cgi?id=55425

          Priority: medium
            Bug ID: 55425
          Assignee: [email protected]
           Summary: PDF import: support encryption algorithm value 4
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: UNCONFIRMED
           Version: 3.7.0.0.alpha0+ Master
         Component: filters and storage
           Product: LibreOffice

For example, the .pdf file attached to
<https://bugzilla.redhat.com/show_bug.cgi?id=826526> "cannot import pdf 1-5
format with encrypted sections in otherwise unprotected document" (as
<https://bugzilla.redhat.com/attachment.cgi?id=587716>) contains an Encrypt
dictionary of

10747 0 obj
<< /Length 128
   /CF << /StdCF << /Length 16
                    /AuthEvent /DocOpen
                    /CFM /AESV2 >> >>
   /Filter /Standard
   /O (...binary...)
   /P -1052
   /R 4
   /U (...binary...)
   /V 4
   /StrF /StdCF
   /StmF /StdCF >>
endobj

whose V entry 4 specifies an en-/decryption algorithm that makes use of the CF,
StmF, and StrF entries.  This was introduced with PDF 1.5 (for reference, see
Table 20 "Entries common to all encryption dictionaries" in section 7.6.1 of
<http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf>
"Document management — Portable document format — Part 1: PDF 1.7").

But our import code currently only supports older algorithm values 1 and 2 (cf.
"m_pData->m_nAlgoVersion > 2" in PDFFile::setupDecryptionData at
<http://cgit.freedesktop.org/libreoffice/core/tree/sdext/source/pdfimport/pdfparse/pdfentries.cxx?id=eecaca80bdcf9060a5dd06a835a2c1752b4fec01#n1235>).
 The resulting effect is that LO keeps asking for a password to open the
document (bAuthenticated can never become true in the loop in checkEncryption
at
<http://cgit.freedesktop.org/libreoffice/core/tree/sdext/source/pdfimport/wrapper/wrapper.cxx?id=eecaca80bdcf9060a5dd06a835a2c1752b4fec01#n944>).

So, it would be nice if we also supported algorithm value 4.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to