Issue 118936 - Can't open docx or xlsx 2010 file with password (MS Office 2010 "Agile Encryption")
Summary: Can't open docx or xlsx 2010 file with password (MS Office 2010 "Agile Encryp...
Status: RESOLVED FIXED
Alias: None
Product: General
Classification: Code
Component: security (show other issues)
Version: 3.4.1
Hardware: All All
: P3 Normal with 7 votes (vote)
Target Milestone: 4.2.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: interop_OOXML, ms_interoperability
Depends on:
Blocks:
 
Reported: 2012-02-20 09:23 UTC by Li Feng Wang
Modified: 2024-03-18 21:17 UTC (History)
11 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: 4.2.0-dev
Developer Difficulty: Moderate
jsc: 4.0.0_release_blocker-


Attachments
Bugdoc created with Excel2010 (15.00 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-07-04 09:33 UTC, Armin Le Grand
no flags Details
Testfile saved with pwd 'hello' using MS2007 (12.50 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-07-09 09:26 UTC, Armin Le Grand
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Li Feng Wang 2012-02-20 09:23:11 UTC
reproduce steps:
1)new MS file with open password(xlsx)
2)open it with AOO
3)Select "Microsoft Excel 2007 XML" in Filter Selection dialog


defect:
open failed

notes:
open xlsx file without password successfully.
Comment 1 Li Feng Wang 2012-02-21 01:51:15 UTC
can open xlsx file created by MS 2007.
Can't open xlsx file created by MS 2010
Comment 2 hlopetz 2012-11-01 17:44:58 UTC
not sure how to vote but please consider this message as my +1 for the issue.
Comment 3 Oliver-Rainer Wittmann 2013-06-04 10:33:19 UTC
Reproduced with AOO 3.4.1 on Windows 7
Comment 4 Armin Le Grand 2013-07-04 09:33:59 UTC
Created attachment 80995 [details]
Bugdoc created with Excel2010
Comment 5 hdu@apache.org 2013-07-08 11:27:07 UTC
The password for the sample docs is "hello".
Comment 6 Andre 2013-07-08 15:50:25 UTC
This looks more like a request for enhancement (add support for Excel 2010 encryption support) than a bug.
Probably not something that we can do for 4.0
Comment 7 Armin Le Grand 2013-07-09 09:26:30 UTC
Created attachment 81041 [details]
Testfile saved with pwd 'hello' using MS2007
Comment 8 hdu@apache.org 2013-07-09 12:22:25 UTC
Confirming that this is an enhancement request. The difference between the encrypted Excel 2007 and 2010 formats is mostly the EncryptionInfo.

Excel 2007 uses a binary format for the EncryptionInfo Stream (version 4.2 as defined in chapter 2.3.4.5 of MSOFFCRYPTO.pdf) whereas Excel 2010 uses an XML-based format (version 4.4 as defined in chapter 2.3.4.10 of the same MSOFFCRYPTO.pdf).
Comment 9 hdu@apache.org 2013-07-09 13:01:20 UTC
Code pointer for volunteers: the source file main/oox/source/core/filterdetect.cxx with its function lclReadEncryptionInfo() and FilterDetect's method extractUnencryptedPackage() are a good starting point.
Comment 10 jsc 2013-07-09 13:12:03 UTC
remove showstopper request, it's no bug but an enhancement

No easy fix available in time
Comment 11 oooforum (fr) 2016-12-13 09:06:17 UTC
*** Issue 92645 has been marked as a duplicate of this issue. ***
Comment 12 damjan 2024-03-12 03:00:04 UTC
This is still an issue even in the latest trunk. We need to add support for the MS-OFFCRYPTO.pdf section 2.3.4.10 "Agile Encryption".

I am working on it. So far I can parse the Agile Encryption headers, distinguish  between Standard and Agile encryption, and get OpenOffice to ask for a password when the Agile encrypted file is opened, but the actual decryption and verification is still WIP.
Comment 13 damjan 2024-03-16 03:49:25 UTC
Fixed by commit 506fa58b1970084a0caacb50b3a805e469be4756, resolving fixed.

Thank you for your bug report and sample files!
Comment 14 Matthias Seidel 2024-03-18 21:17:34 UTC
Cherry-picked for AOO42X