Bug 158537 - Encrypted hybrid PDFs are opened as regular PDFs with Draw, with no option to enter password
Summary: Encrypted hybrid PDFs are opened as regular PDFs with Draw, with no option to...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 158559 (view as bug list)
Depends on:
Blocks: Password-Protected
  Show dependency treegraph
 
Reported: 2023-12-05 10:39 UTC by Bufetr
Modified: 2024-02-05 07:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple ODF text file with Lorem Ipsum text before saving to hybrid PDF (37.34 KB, text/plain)
2023-12-05 10:45 UTC, Bufetr
Details
Encrypted hybrid PDF file created with 7.6.2 (22.88 KB, application/pdf)
2023-12-05 10:49 UTC, Bufetr
Details
Encrypted hybrid PDF file created with 7.6.4 (51.22 KB, application/pdf)
2023-12-08 10:30 UTC, Bufetr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bufetr 2023-12-05 10:39:49 UTC
Description:
LibreOffice can't open encrypted hybrid PDFs when created or edited with the latest 3 major releases, 7.4, 7.5 and current 7.6 of Community Edition.

Hybrid PDFs created with pre-7.4 versions can be opened as expected in the latest (7.6.3.2) and any version.

Editing a pre-7.4 version hybrid PDF file with the 3 latest versions and saving it, reproduces the problem as mentioned.

Steps to Reproduce:
1.Create an ODF file with Writer, Calc or Impress
2.Save ODF file as hybrid PDF
3.Open hybrid PDF with LibreOffice

Actual Results:
Files are opened in LibreOffice Draw as regular PDF files with the text "This PDF file is encrypted and can't be opened."

Expected Results:
Show a window to enter password in Writer, Calc or Impress


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
7.6.3-3
Calc: threaded
Comment 1 Bufetr 2023-12-05 10:45:19 UTC
Created attachment 191241 [details]
Simple ODF text file with Lorem Ipsum text before saving to hybrid PDF

Simple ODF text file of "Lorem ipsum" text before saving to hybrid PDF
Comment 2 Bufetr 2023-12-05 10:49:22 UTC
Created attachment 191242 [details]
Encrypted hybrid PDF file created with 7.6.2

Encrypted hybrid PDF file created from the previous ODF text file attachment with 7.6.2 Community Edition, in 21 Nov 2023.
Comment 3 Bufetr 2023-12-05 12:44:40 UTC
Comment on attachment 191242 [details]
Encrypted hybrid PDF file created with 7.6.2

Password of this file is "loremipsum" without the "".
Comment 4 Bufetr 2023-12-05 12:45:36 UTC Comment hidden (obsolete)
Comment 5 Bufetr 2023-12-05 12:46:04 UTC Comment hidden (obsolete)
Comment 6 m_a_riosv 2023-12-06 15:10:54 UTC
*** Bug 158559 has been marked as a duplicate of this bug. ***
Comment 7 MilesB 2023-12-06 17:49:28 UTC
I can confirm that the bug is present in

Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 29d686fea9f6705b262d369fede658f824154cc0
CPU threads: 8; OS: Mac OS X 14.1.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Tested with both the provided attached Lorem Ipsum file and a new ODF text file.

(UNCONFIRMED>NEW)
Comment 8 Telesto 2023-12-06 19:30:22 UTC
Confirm

A hybrid PDF with password generated with
Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: a9ad36ae46ff76c0d59b0d170314fdd3a9ee5d35
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

doesn't open in Writer. Older versions are also unable to open the file in Writer.

A hybrid PDF with password generated with
Version: 7.0.7.0.0+ (x64)
Build ID: 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

opens in Writer with 7.0.7 and current master
Comment 9 Stéphane Guillou (stragu) 2023-12-07 10:06:34 UTC
With the example file exported as hybrid PDF with a password for opening, not reproduced in:

Version: 7.4.7.2 / LibreOffice Community
Build ID: 723314e595e8007d3cf785c16538505a1c878ca5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Nor in:

Version: 7.5.8.2 (X86_64) / LibreOffice Community
Build ID: f718d63693263970429a68f568db6046aaa9df01
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

In those, I can open the file and I am prompted for a password, which contradicts Comment 0.

However, reproduced in:

Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 29d686fea9f6705b262d369fede658f824154cc0
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Draw open the file with the message "This PDF file is encrypted and can't be opened" on page, without a password prompt.

Bibisected with linux-64-7.6 repo to first bad build commit [992931283a6377bd41a27ce1a42312feb9ac80a7] which points to core commit:

commit e052f6e1d49a5289411b31561d6e310bf414d896
author	Tomaž Vajngerl 	Mon Jan 23 12:33:39 2023 +0900
committer	Tomaž Vajngerl  Tue Jan 24 10:50:49 2023 +0000
tdf#66580 write ODF document as an attachment in hybrid mode
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146053

Quikee, can you please have a look?
Comment 10 Bufetr 2023-12-08 10:30:27 UTC
Created attachment 191309 [details]
Encrypted hybrid PDF file created with 7.6.4

Created with the same attached ODF file I submitted first (191241). It is still reproducing the bug. Password is the same as the previous file, "loremipsum" without the "".

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 4; OS: Linux 6.6; UI render: default; VCL: gtk3
Locale: el-GR (en_US.UTF-8); UI: en-US
7.6.4-1
Calc: threaded
Comment 11 Bufetr 2024-02-05 07:52:54 UTC
Bugs still exists with new version 24.2.0.3

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: 420(Build:3)
CPU threads: 4; OS: Linux 6.7; UI render: default; VCL: gtk3
Locale: el-GR (en_US.UTF-8); UI: en-US
24.2.0-1
Calc: threaded