Bug 41377

Summary: Password protected sections are read only
Product: LibreOffice Reporter: Allan Jacobs <jacobsallanster>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: LibreOffice
Priority: medium    
Version: 3.4.3 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Input containing a writable section.

Description Allan Jacobs 2011-09-30 20:44:56 UTC
Created attachment 51833 [details]
Input containing a writable section.

Open the attached document.
Select the text in the section with the yellow background.
Format->Sections...
Protected
With password
p1234
OK
OK
File->Save
File->Close
Open the attachment.
Try to change "Four" in "Four score" to "Five"

A dialog pops up reading
"Readonly content cannot be changed.  No modifications will be accepted."
without prompting for the password.
Comment 1 Rainer Bielefeld Retired 2011-10-01 01:40:20 UTC
I do not understand the problem, to me reported behavior seems to be the expected one-

@Reporter:
please:
- add information 
  -- what exactly is unexpected
  -- and why do you believe it's unexpected (cite Help or Documentation!)

Please file Bug reports with status UNCONFIRMED if your are not absolutely sure that you contributed all required background information, that the problem will be reproducible with information you can provide or that your enhancement request will be accepted! Thank you!
Comment 2 Allan Jacobs 2011-10-03 17:56:52 UTC
http://www.libreoffice.org/get-help/documentation/

In the Writer guide, Chapter: Chapter 4 Formatting Pages, Section: Password-protecting sections.

"To prevent others from editing the section’s attributes or format, protect the section with a password, as follows:
1) Select the With password option. The Enter Password dialog box opens.
2) Type a password in the Password field and then confirm the password by typing it again in the Confirm field.
3) Click OK. The Enter Password dialog box closes. Anyone who tries to edit the section’s attributes or format will be prompted to enter the password."

The bug is that password protection makes the section read-only.  The expectation is that the user attempting to change the section will be prompted for the password that was set when the document was saved.  Not that all attempts to modify the section will be rejected.

If the password offered matches the password set then the document will in fact be saved.  If the password offered does not match the saved password then the changes will be rejected.
Comment 3 Urmas 2011-10-18 19:05:19 UTC
The manual clearly states that format protection is a superset of a content protection. Therefore password-protected sections are read-only by design.