Bug 89383 - Writer: Read-only passwords on OOXML files are not working
Summary: Writer: Read-only passwords on OOXML files are not working
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Tünde Tóth
URL:
Whiteboard: target:7.3.0
Keywords:
: 125206 (view as bug list)
Depends on:
Blocks: Password-Protected
  Show dependency treegraph
 
Reported: 2015-02-14 21:45 UTC by Zeki Bildirici
Modified: 2021-10-05 12:04 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOCX file (7.50 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-02-14 21:45 UTC, Zeki Bildirici
Details
Sample XLSX file (8.00 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-02-14 21:46 UTC, Zeki Bildirici
Details
Sample PPTX file (35.50 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2015-02-14 21:47 UTC, Zeki Bildirici
Details
Updated docx file (17.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-06-19 08:41 UTC, NISZ LibreOffice Team
Details
Updated xlsx file (13.50 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-06-19 08:42 UTC, NISZ LibreOffice Team
Details
Updated pptx file (36.50 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-06-19 08:43 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zeki Bildirici 2015-02-14 21:45:48 UTC
Created attachment 113387 [details]
Sample DOCX file

Hi,

Steps to reproduce:

1- Save a document with both opening password and edit password with OOXML formats such as docx, xlsx, pptx
2- Open the file with LibreOffice or Microsoft Office

It will ask you the opening password, but the content is not read only.
(If you just set 'Open in Read-only' checkbox active and no edit password, it will opens read only)

Expected results:

Editing password to work.

Attaching sample files.

Best regards,
Zeki
Comment 1 Zeki Bildirici 2015-02-14 21:46:47 UTC
Created attachment 113388 [details]
Sample XLSX file
Comment 2 Zeki Bildirici 2015-02-14 21:47:13 UTC
Created attachment 113389 [details]
Sample PPTX file
Comment 3 Zeki Bildirici 2015-02-14 21:51:25 UTC
Oops! The passwords are:

Opening Password: a
Edit password: b
Comment 4 Buovjaga 2015-02-22 13:14:15 UTC
Confirmed with attachment 113387 [details].

Win 7 Pro 64-bit, LibO Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: fi_FI

Version: 4.5.0.0.alpha0+
Build ID: b13534de022972131b46f93f5ada90af155eec9e
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-02-19_00:21:37
Locale: fi_FI

Ubuntu 14.10 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

Version: 4.4.0.3
Build ID: 40m0(Build:3)
Locale: en_US
Comment 5 tommy27 2016-04-16 07:22:48 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2017-05-22 13:22:13 UTC Comment hidden (obsolete, spam)
Comment 7 Roman Kuznetsov 2019-01-28 20:34:37 UTC
still repro in

Version: 6.1.4.2
Build ID: 1:6.1.4-0ubuntu0.18.10.1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: ru-RU (ru_RU.UTF-8); Calc: group threaded
Comment 8 NISZ LibreOffice Team 2019-11-07 14:15:56 UTC
*** Bug 125206 has been marked as a duplicate of this bug. ***
Comment 9 Justin L 2020-06-18 18:58:57 UTC
Repro 7.1+.

At first I thought MSO doesn't have this kind of dual security, but then in MS Word 2003 I saw in Tools - Options - Security the exact ability to see in LO, with an "open" password and also an "edit" password.  However, Word 2003 acted the same as LO does. It only asked for the open password, and didn't ask for a second password when I started editing.

So I think we need proof that this works in an MSO environment. An example document needs to be created by Word that contains both of these two things working. Since this is an old bug, I'll mark it as NOTABUG instead of NEEDSINFO, but anyone can re-open if they produce an example.
Comment 10 NISZ LibreOffice Team 2020-06-19 08:41:57 UTC
Created attachment 162200 [details]
Updated docx file

Somehow the original file did not seem to actually contain this setting, at least not by my Office 2013. But with this one it asks for two passwords: one for opening (a) and another for editing (b).
Comment 11 NISZ LibreOffice Team 2020-06-19 08:42:40 UTC
Created attachment 162201 [details]
Updated xlsx file
Comment 12 NISZ LibreOffice Team 2020-06-19 08:43:08 UTC
Created attachment 162202 [details]
Updated pptx file
Comment 13 Timur 2021-09-09 07:55:57 UTC
Impress had it's own bug.
Comment 14 Commit Notification 2021-09-27 14:35:46 UTC
Tünde Tóth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bfd7730f4cf002a79dc9c02c23286850fee3f12a

tdf#89383 DOCX import: fix permission 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 15 Timur 2021-10-01 06:49:29 UTC
This bug was for both Docx and Xlsx. 
Tünde, please comment on Xlsx, can you fix or a new bug should be opened.
Comment 16 NISZ LibreOffice Team 2021-10-05 08:04:44 UTC
Verified in:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c2de581d1943df2d84f2b71817b6a8bee41f0217
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL
Comment 17 Gabor Kelemen (allotropia) 2021-10-05 08:50:03 UTC
(In reply to Timur from comment #15)
> This bug was for both Docx and Xlsx. 
> Tünde, please comment on Xlsx, can you fix or a new bug should be opened.

Edit password in XLSX was fixed in bug 115933 (open) and bug 118938 (save).
PPTX attachment 162202 [details] is still opened without the edit password and needs a separate report for reading (then writing) the edit password.
The bug 38370 (and its See Also duplicates bug 33538 and bug 73971) is about ppt, not pptx.
Comment 18 Timur 2021-10-05 10:51:15 UTC
thanks for the explanation. 
In Writer, Calc ODF was working for edit pass (and Docx, Xlsx were fixed), while in Impress not, bug 144399, so that should be fixed before Pptx.