Bug 124451 - 'Protect form' compatibility setting doesn't prevent editing in some cases (focus on #2)
Summary: 'Protect form' compatibility setting doesn't prevent editing in some cases (f...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Doc-Protection
  Show dependency treegraph
 
Reported: 2019-03-30 23:51 UTC by Aron Budea
Modified: 2019-06-10 14:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sectionComparison.doc: attempt to document LO/MS implementations of sections (28.00 KB, application/msword)
2019-04-13 13:23 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2019-03-30 23:51:33 UTC
These are actually two somewhat different regressions originating from the same commit. I'm reporting both here, but can split one off if it's more feasible.

1.
- Type some text in an empty document.
- Enable 'Protect form' Writer compatibility setting.
- Try typing some more text in the document.

=> Typing is possible. The document should be protected and uneditable (apart from filling in forms).
After saving it in DOC(X) format, and reloading it, the document is protected since the fresh fix to bug 123912 comment 2, but it should become protected right away.

2.
- Open attachment 149778 [details] from bug 123912, which contains a single drop-down form field, and is form-protected.
- Position cursor before the dropdown, and press Enter to insert a line break.
- Move the cursor up, and start typing.

=> This specific typing is possible, while no typing should be possible.

Both of these regressions were introduced by the following commit. Adding Cc: to Serge Krot, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=0898595532d1e3f498c259b6dfee462249b00667
author		Serge Krot <Serge.Krot@cib.de>	2018-12-17 17:07:23 +0100
committer	Thorsten Behrens <Thorsten.Behrens@CIB.de>	2018-12-20 15:16:34 +0100

sw: DOCX: allow editing of unprotected areas in protected doc
Comment 1 Justin L 2019-04-02 15:06:27 UTC
verified that the bisect and reproduction steps are correct.
Comment 2 Justin L 2019-04-13 13:23:50 UTC
Created attachment 150730 [details]
sectionComparison.doc: attempt to document LO/MS implementations of sections

With comment 0's patch, Protect Forms basically became meaningless. After some testing, I think that is OK.

People designing Forms in LO should just use LO's native section protection capabilities. That should export / import OK to MS formats now.
Comment 3 Justin L 2019-04-13 13:55:30 UTC
(In reply to Justin L from comment #2)
> With comment 0's patch, Protect Forms basically became meaningless. After
> some testing, I think that is OK.

Probably the label should be changed to "Protect Forms  (depricated - create write-protected sections instead)"
Comment 4 Justin L 2019-05-03 04:11:24 UTC
(In reply to Justin L from comment #3)
> Probably the label should be changed to "Protect Forms  (depricated - create
> write-protected sections instead)"

see https://gerrit.libreoffice.org/71716 revert tdf#123912 ww8 export: re-protect implicit section
Comment 5 Justin L 2019-05-03 06:29:40 UTC
(In reply to Aron Budea from comment #0)
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=0898595532d1e3f498c259b6dfee462249b00667
> author Serge Krot <Serge.Krot@cib.de>	2018-12-17 17:07:23 +0100
>       sw: DOCX: allow editing of unprotected areas in protected doc
A bit of sleuthing discovered that this is tied to bug 122201.
Comment 6 Justin L 2019-06-10 14:01:51 UTC
(In reply to Aron Budea from comment #0)
> 1.
> After saving it in DOC(X) format, and reloading it, the document is
> protected since the fresh fix to bug 123912 comment 2, but it should become
> protected right away.
The change of #1 was intended, and the mentioned fix has been reverted, so the document is always unprotected now. So ignore this part of the bug report.
 
> 2.
> - Open attachment 149778 [details] from bug 123912, which contains a single
> drop-down form field, and is form-protected.
> - Position cursor before the dropdown, and press Enter to insert a line
> break.
> - Move the cursor up, and start typing.
> 
> => This specific typing is possible, while no typing should be possible.
This could still be considered a minor bug. Changed the subject to focus on this part of the report.