mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Security handler fix: if metadata are not encrypted, encryption produces invalid PDF document
This commit is contained in:
@ -2025,6 +2025,8 @@ PDFSecurityHandlerPointer PDFSecurityHandlerFactory::createSecurityHandler(const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handler->m_filterDefault.encryptMetadata = settings.encryptContents == All;
|
||||||
|
|
||||||
switch (settings.encryptContents)
|
switch (settings.encryptContents)
|
||||||
{
|
{
|
||||||
case All:
|
case All:
|
||||||
@ -2050,8 +2052,6 @@ PDFSecurityHandlerPointer PDFSecurityHandlerFactory::createSecurityHandler(const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
handler->m_filterDefault.encryptMetadata = settings.encryptContents == All;
|
|
||||||
|
|
||||||
if (standardHandler)
|
if (standardHandler)
|
||||||
{
|
{
|
||||||
handler->m_cryptFilters["StdCF"] = handler->m_filterDefault;
|
handler->m_cryptFilters["StdCF"] = handler->m_filterDefault;
|
||||||
|
Reference in New Issue
Block a user