Bug 121304 - FILESAVE DOCX Documents that have Restrict Editing settings set, but aren't protected become protected after saving
Summary: FILESAVE DOCX Documents that have Restrict Editing settings set, but aren't p...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Doc-Protection 122201
  Show dependency treegraph
 
Reported: 2018-11-09 09:46 UTC by NISZ LibreOffice Team
Modified: 2019-01-07 09:45 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The original file created in Microsoft Word 2013. (17.28 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-09 09:46 UTC, NISZ LibreOffice Team
Details
The file exported with LibreOffice 6.2Dev. (13.42 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-09 09:46 UTC, NISZ LibreOffice Team
Details
A screenshot showcasing the issue. (47.97 KB, image/png)
2018-11-09 09:47 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2018-11-09 09:46:06 UTC
Description:
The editing of DOCX documents can be restricted to filling in forms in Microsoft Word: these documents can be still modified just like a normal document until a password is added to the file. After that, only the form control elements can be interacted with.

When a DOCX document that has the “restricted to filling in forms” option turned on, but isn't protected with a password is opened first in LibreOffice, it appears just like a regular, editable document. But after the file is saved as DOCX and reopened, it turns into read only document.


Steps to Reproduce:
1.	Create a new document in Microsoft Word.
2.	Type in some text (no form control elements are actually needed).
3.	Go to the Developer tag and click on the Restricted Editing button.
4.	Select the “Filling in forms” option under “2. Editing restrictions”.
5.	Save the file as DOCX and close Microsoft Word.
6.	Open the DOCX file in LibreOffice Writer and try to change it: you can edit it just like a regular document.
7.	Save the file as DOCX, and click on File > Reload.


Actual Results:
The document turns into read only.

Expected Results:
The document shouldn't be read only because it isn't yet protected with a password yet.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2018-11-09 09:46:33 UTC
Created attachment 146483 [details]
The original file created in Microsoft Word 2013.
Comment 2 NISZ LibreOffice Team 2018-11-09 09:46:57 UTC
Created attachment 146484 [details]
The file exported with LibreOffice 6.2Dev.
Comment 3 NISZ LibreOffice Team 2018-11-09 09:47:13 UTC
Created attachment 146485 [details]
A screenshot showcasing the issue.
Comment 4 Aron Budea 2018-11-13 21:23:16 UTC
The description needs refining, this document isn't actually protected/restricted, only the parameters are given. In Word have to press "Yes, Start Enforcing Protection", and then have the option, but don't need to add a password.

The issue is that after saving in Writer the document actually becomes protected/restricted. It's a bug, but personally I don't think it's a significant one, I doubt documents are often shared like this.
Comment 5 Xisco Faulí 2018-11-14 11:51:48 UTC
I don't think it's a regression, but the document became protected after https://cgit.freedesktop.org/libreoffice/core/commit/?id=2694162969cf86ef366d3ce812fccd0630acc800

author	Serge Krot <Serge.Krot@cib.de>	2017-09-29 18:01:54 +0200
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2017-10-06 08:06:59 +0200
commit 2694162969cf86ef366d3ce812fccd0630acc800 (patch)
tree d138fe58a69d5c048f31e5a571b52b86a36db558
parent b567cfb980435df131d776915bce9152135bdf0f (diff)
tdf#66398 Import/export docx document protection properties
Added:
+ import/export of all doc protection properties
+ unit test

@Serge Krot, would you mind taking a look at this issue when you have some spare time ?
Comment 6 Justin L 2019-01-05 10:49:32 UTC
fixed in LO 6.3 by commit 0898595532d1e3f498c259b6dfee462249b00667
Author: Serge Krot Mon Dec 17 17:07:23 2018 +0100
   sw: DOCX: allow editing of unprotected areas in protected doc    
    Change-Id: I5fb590745b733e2bfb934d946276857b65caf680
    Reviewed-on: https://gerrit.libreoffice.org/65278