Bug 148457 - Blank password works for a pdf file set with permission password
Summary: Blank password works for a pdf file set with permission password
Status: RESOLVED DUPLICATE of bug 49697
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: PDF-Import-Draw Password-Protected
  Show dependency treegraph
Reported: 2022-04-08 03:22 UTC by Chris
Modified: 2022-04-11 08:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

sample pdf created in Libreoffice with permission password (11.24 KB, application/pdf)
2022-04-08 08:40 UTC, Chris

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2022-04-08 03:22:17 UTC
Blank password works for a pdf file set with permission password making the applied security useless when opening the pdf file in Libreoffice app.

Actual Results:
Libreoffice allows to open/edit a protected file using a blank password 

Expected Results:
Blank password definitely should not be allowed to open/edit a password protected pdf file

Reproducible: Always

User Profile Reset: No

Additional Info:
Please fix it!
Comment 1 Timur 2022-04-08 08:24:09 UTC
You need to attach PDF. Seems like you report Fileopen problem with PDF that was created in some other app.
Comment 2 Chris 2022-04-08 08:40:53 UTC
Created attachment 179405 [details]
sample pdf created in Libreoffice with permission password
Comment 3 Chris 2022-04-08 08:43:07 UTC
When I open the pdf file in LibreOffice it will prompt to key in password, if wrong password it will say wrong and will not continue, if blank or empty password it will let me open/edit the file.
Comment 4 QA Administrators 2022-04-09 04:13:32 UTC Comment hidden (obsolete)
Comment 5 Stéphane Guillou (stragu) 2022-04-09 07:47:42 UTC
PDF opens without prompting for password in Firefox 99.0 and GNOME Document Viewer 3.36.10.

Bug confirmed in LO 7.2.6: prompted for password, asks again if not the right password, but opens if the password field is empty. Same thing if clicking "Cancel".

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

Also confirmed with:

Build ID: 1:6.4.7-0ubuntu0.20.04.4
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 6 Stéphane Guillou (stragu) 2022-04-09 08:04:21 UTC Comment hidden (obsolete)
Comment 7 Timur 2022-04-10 07:58:41 UTC
Also please explain why not duplicate or mark that is is. 
Rule of thumb is search in existing bugs before reporting.
Comment 8 Chris 2022-04-11 02:26:47 UTC
(In reply to stragu from comment #6)
> pdfinfo for the file:
> Creator:        Writer
> Producer:       LibreOffice 7.2
> CreationDate:   Fri Apr  8 18:36:02 2022 AEST
> Tagged:         no
> UserProperties: no
> Suspects:       no
> Form:           none
> JavaScript:     no
> Pages:          1
> Encrypted:      yes (print:no copy:no change:no addNotes:no algorithm:RC4)
> Page size:      595.304 x 841.89 pts (A4)
> Page rot:       0
> File size:      11507 bytes
> Optimized:      no
> PDF version:    1.6
> Very much related to Bug 49697, potentially a duplicate.
> Chris, can you please give us the password for the file you created? I want
> to make sure it wasn't an empty password, and would be useful to test
> further anyway.

Hi, password is 123
Comment 9 QA Administrators 2022-04-11 03:31:59 UTC Comment hidden (obsolete)
Comment 10 Timur 2022-04-11 08:01:28 UTC
It's expected that this PDF opens. 
As for editing, not a potential but real duplicate.

*** This bug has been marked as a duplicate of bug 49697 ***