Bug 128744 - FILEOPEN DOCX Unable to unlock change tracking password (also unlock without asking the password)
Summary: FILEOPEN DOCX Unable to unlock change tracking password (also unlock without ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: Password-Protected DOCX-Track-Changes DOCX-Doc-Protection
  Show dependency treegraph
 
Reported: 2019-11-12 13:04 UTC by NISZ LibreOffice Team
Modified: 2022-05-17 09:48 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the problem in Writer. (39.82 KB, image/png)
2019-11-12 13:05 UTC, NISZ LibreOffice Team
Details
A test document with the password "test" (20.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-05-16 07:41 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-11-12 13:04:55 UTC
Description:
After the fix of bug #106843 it is supported to lock change tracking in DOCX files, but removing that password is still not possible. 

Steps to Reproduce:
1.	Open attachment #148094 [details]
2.	Go to File – Properties – Security
3.	Click the Unprotect button. The password of that document is test


Actual Results:
Password is not accepted.

Expected Results:
Password should be accepted


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha1+ (x86)
Build ID: 80109586e6cb6d3e2e0a53a9079c3125ec9b8368
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2019-11-12 13:05:25 UTC
Created attachment 155740 [details]
Screenshot of the problem in Writer.
Comment 2 Dieter 2019-11-14 20:45:36 UTC
I confirm it with

Version: 6.4.0.0.alpha1 (x64)
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 3 László Németh 2022-05-06 10:59:34 UTC
Commit description:

tdf#128744 sw DOCX: unprotect change tracking with verification

Unprotect change tracking only by password verification
instead of 1) unprotecting without the password or 2) rejecting
the correct password.

I.e. now 1) clicking on Record changes icon of Track Changes
toolbar or Edit->Track Changes->Record asks for a password, and
2) Unprotect Record changes on Security page of
File->Properties... accepts the correct password with disabling
record changes.

Show also "Invalid password!" dialog disabling Record Changes
by its icon or menu option, like Properties... dialog window does,
if the password is invalid.

Note: Still allow to unprotect OpenDocument export of a
protected OOXML import document, because that doesn't contain
the original password info, only a dummy RedlinePassword.
(OpenDocument exports protect Track Changes with the simple
RedlineProtectionKey configuration setting, so it's not
possible to map the OOXML password info to OpenDocument without
extending this.)

Follow-up to commit d416250f4f1766e2d596ea3feef6a94b7adf29f4
"tdf#106843 DOCX: forbid disabling protected Record Changes".

See also commit bfd7730f4cf002a79dc9c02c23286850fee3f12a
"tdf#89383 DOCX import: fix permission for editing".
Comment 4 Commit Notification 2022-05-06 11:00:06 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/28c31ba12567f66ccb6a334fd21af10880f4a33b

tdf#128744 sw DOCX: unprotect change tracking with verification

It will be available in 7.4.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 5 Xisco Faulí 2022-05-06 12:29:16 UTC Comment hidden (obsolete)
Comment 6 László Németh 2022-05-06 14:25:58 UTC
(In reply to Xisco Faulí from comment #5)
> Hi László,
> I think this is worth it to be mentioned in the release notes:
> https://wiki.documentfoundation.org/ReleaseNotes/7.4

Hi Xisco,

Thanks for the suggestion. I've added here:

https://wiki.documentfoundation.org/ReleaseNotes/7.4#Unlock_protected_change_tracking_by_password_verification


Best regards,

László
Comment 7 Dieter 2022-05-13 13:19:44 UTC
For me bug is still present with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 83d0f2eebae41d431d9a5bfd1a918523977752d0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

(tested with steps from comment 0)

=> REOPENED
Comment 8 László Németh 2022-05-15 12:35:13 UTC
(In reply to Dieter from comment #7)
> For me bug is still present with
> 
> Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
> Build ID: 83d0f2eebae41d431d9a5bfd1a918523977752d0
> CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL:
> win
> Locale: de-DE (de_DE); UI: en-GB
> Calc: CL
> 
> (tested with steps from comment 0)
> 
> => REOPENED

@Dieter: According to the build ID 83d0f2eebae41d431d9a5bfd1a918523977752d0, your LO test build is from 26 Apr (see https://gerrit.libreoffice.org/c/core/+/126501), but this bug was fixed on 9 May. Could you check it with a newer build, which contains the fix, please? Newer builds:

https://dev-builds.libreoffice.org/daily/master/
Comment 9 Dieter 2022-05-16 07:31:01 UTC
(In reply to László Németh from comment #8)
> @Dieter: According to the build ID 83d0f2eebae41d431d9a5bfd1a918523977752d0,
> your LO test build is from 26 Apr (see
> https://gerrit.libreoffice.org/c/core/+/126501), but this bug was fixed on 9
> May.

Thank you for your hint. I've just recognized, that installation of a more recent version failed. But also with the following version problem is still present:

Version: 7.4.0.0.alpha1 (x64) / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

=> REOPENED
Comment 10 László Németh 2022-05-16 07:41:49 UTC
Created attachment 180133 [details]
A test document with the password "test"
Comment 11 László Németh 2022-05-16 07:47:37 UTC
(In reply to Dieter from comment #9)
> (In reply to László Németh from comment #8)
> > @Dieter: According to the build ID 83d0f2eebae41d431d9a5bfd1a918523977752d0,
> > your LO test build is from 26 Apr (see
> > https://gerrit.libreoffice.org/c/core/+/126501), but this bug was fixed on 9
> > May.
> 
> Thank you for your hint. I've just recognized, that installation of a more
> recent version failed. But also with the following version problem is still
> present:
> 
> Version: 7.4.0.0.alpha1 (x64) / LibreOffice Community
> Build ID: b871abad383583f02eb49c7e49aeae01f6941072
> CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL:
> win
> Locale: de-DE (de_DE); UI: en-GB
> Calc: CL
> 
> => REOPENED

@Dieter: Thanks for testing! It seemed for me, that the test document mentioned in the report has a different password, not "test". I've attached a new one (the unit test document of the patch), where I copied an MSO generated "test" password of locked editing to lock changeTracking. Otherwise, it would be fine to check both test documents in MSO 2019, where this encryption is supported.
Comment 12 László Németh 2022-05-16 09:49:00 UTC
(In reply to László Németh from comment #11)
> @Dieter: Thanks for testing! It seemed for me, that the test document
> mentioned in the report has a different password, not "test". I've attached
> a new one (the unit test document of the patch), where I copied an MSO
> generated "test" password of locked editing to lock changeTracking.
> Otherwise, it would be fine to check both test documents in MSO 2019, where
> this encryption is supported.

@Dieter: the newly attached file handled by LibreOffice and Word correctly, too. But it seems, MSO 2019 uses some "Legacy Password Hash Algorithm" or other tricks, according to https://stackoverflow.com/questions/65877620/open-xml-document-protection-implementation-documentprotection-class, so we are going to file a new bug for the older test document, too. Thanks for your verification!
Comment 13 Dieter 2022-05-16 14:21:29 UTC
(In reply to László Németh from comment #10)
> Created attachment 180133 [details]
> A test document with the password "test"

VERIFIED with that document and

Version: 7.4.0.0.alpha1 (x64) / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Lásló, thanks for fixing it!
Comment 14 László Németh 2022-05-17 09:48:24 UTC
(In reply to Dieter from comment #13)
> (In reply to László Németh from comment #10)
> > Created attachment 180133 [details]
> > A test document with the password "test"
> 
> VERIFIED with that document and
> 
> Version: 7.4.0.0.alpha1 (x64) / LibreOffice Community
> Build ID: b871abad383583f02eb49c7e49aeae01f6941072
> CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL:
> win
> Locale: de-DE (de_DE); UI: en-GB
> Calc: CL
> 
> Lásló, thanks for fixing it!

Dieter, thanks for the verification!