Bug 120852 - FILEOPEN: DOCX set to read-only via "Restrict Editing" can be edited in LO
Summary: FILEOPEN: DOCX set to read-only via "Restrict Editing" can be edited in LO
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.0.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Doc-Protection
  Show dependency treegraph
 
Reported: 2018-10-24 04:39 UTC by Aron Budea
Modified: 2020-04-01 08:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX, protected (17.09 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-10-24 04:39 UTC, Aron Budea
Details
Sample DOCX, protected, password: 12345 (17.28 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-10-24 04:40 UTC, Aron Budea
Details
Sample DOCX, protected, with editable region (15.86 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-10-24 04:45 UTC, Aron Budea
Details
Screenshot of editable regions in Word (31.83 KB, image/png)
2018-10-24 04:49 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-10-24 04:39:49 UTC
Created attachment 145951 [details]
Sample DOCX, protected

The attached DOCX has been created and set to protected in Word via Review -> Restrict Editing, with editing restrictions set to No changes (Read Only).
When opened in Writer, there's no editing restriction on the document.

The same happens if the document is protected with a password.

Observed using LO 6.2 alpha1 & 3.3.0 / Windows 7.
Comment 1 Aron Budea 2018-10-24 04:40:45 UTC
Created attachment 145952 [details]
Sample DOCX, protected, password: 12345
Comment 2 Aron Budea 2018-10-24 04:45:52 UTC
Created attachment 145953 [details]
Sample DOCX, protected, with editable region

This document has editable regions after the colons in each line, which should be kept editable.
Comment 3 Aron Budea 2018-10-24 04:49:03 UTC
Created attachment 145954 [details]
Screenshot of editable regions in Word

This is what such a document with editable regions looks like in Word.
Comment 4 Timur 2018-10-24 17:07:13 UTC
OK, let's have a bug for DOCX.
Comment 5 QA Administrators 2019-11-02 03:46:33 UTC Comment hidden (obsolete, spam)
Comment 6 Justin L 2020-03-11 12:09:31 UTC
Only the last patch is really involved in solving this particular bug, but they all flowed out of work for this bug:

https://gerrit.libreoffice.org/c/core/+/90302 writerfilter: DocProtect_enforcement defaults to false

https://gerrit.libreoffice.org/c/core/+/90321 tdf#106843 docxexport: don't write double docProtect

https://gerrit.libreoffice.org/c/core/+/90322 related tdf#106843 docxexport: if not enforced, let Writer protect

https://gerrit.libreoffice.org/c/core/+/90323 tdf#120852 writerfilter: support read-only docProtection
Comment 7 Commit Notification 2020-04-01 08:16:55 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3af7be613526404276210a698f77e0187831b9b1

tdf#120852 writerfilter: support read-only docProtection

It will be available in 7.0.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.