Bug 144374 - Writer: FILESAVE to DOCX as read-only with additional password protection for editing not working
Summary: Writer: FILESAVE to DOCX as read-only with additional password protection for...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.8.2 release
Hardware: All All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.3.0
Keywords: filter:docx
Depends on:
Blocks: Password-Protected
  Show dependency treegraph
 
Reported: 2021-09-08 10:48 UTC by Timur
Modified: 2022-01-31 15:12 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example read-writer protected text document odt (12.82 KB, application/vnd.oasis.opendocument.text)
2021-09-09 07:18 UTC, NISZ LibreOffice Team
Details
Same file saved to docx with the same passwords (8.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-09-09 07:19 UTC, NISZ LibreOffice Team
Details
The odt asks for the edit password (25.89 KB, image/png)
2021-09-09 07:25 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2021-09-08 10:48:52 UTC
Steps to Reproduce:
1. Create a document in Writer
2. Save to DOCX, select the option to password protect and add the option to make this read-only with an additional password for editing.
3. Enter and confirm your passwords and save the file.
4. Reopen the file, and you will see that file opens read-only.

Experienced - both in LO and MSO: Edit-Edit mode can be set without password
Expected: Edit-Edit mode asks for password in LO, file opens with password dialog in MSO.

This is filesave DOCX report similar to bug 89385 for DOC.
Note that DOC behavior is different, Edit mode doesn't work at all, file stays RO.

Note that filesave to XLSX was fixed in bug 118938 and that XLS works.
Fileopen of MSO created pass protected files is in bug 89383.
Comment 1 NISZ LibreOffice Team 2021-09-09 07:15:48 UTC
Confirming with

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c7b5e6566d9b24a0a996c739a945004d9aadee2f
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 2 NISZ LibreOffice Team 2021-09-09 07:18:12 UTC
Created attachment 174918 [details]
Example read-writer protected text document odt
Comment 3 NISZ LibreOffice Team 2021-09-09 07:19:24 UTC
Created attachment 174919 [details]
Same file saved to docx with the same passwords

Opening this file requests the opening password, but Edit - Edit Mode does not
Comment 4 NISZ LibreOffice Team 2021-09-09 07:25:46 UTC
Created attachment 174920 [details]
The odt asks for the edit password

I can't really make a screenshot about the docx file, as it does not shows this dialog when Edit - Edit mode is chosen.
Comment 5 Timur 2021-09-17 10:59:55 UTC
When LO 3.3 started saving as DOCX, it couldn't save with password.
Later password was enabled, but read-only password didn't work and document was open in edit mode, seen with LO 4.2.
Later document would open as read-only, but again not correct, because edit mode could be set without pass.
Comment 6 Commit Notification 2021-10-26 09:59:54 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1b53c1dfc76f08ca7df40a0673aa50eca700d072

tdf#144374 DOCX: export the password for editing

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 NISZ LibreOffice Team 2021-11-08 14:11:14 UTC
Verified in: 

Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 73334560b2dd2d60ac58d2cc2b1a5295490b03e1
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded