Bug 109175 - Writer: Long Password (>15 Chars) for .docx Does Not Validate
Summary: Writer: Long Password (>15 Chars) for .docx Does Not Validate
Status: RESOLVED DUPLICATE of bug 97086
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX Password-Protected
  Show dependency treegraph
 
Reported: 2017-07-17 18:57 UTC by gpowers
Modified: 2017-08-11 17:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Testfile with Password (IGNORE) (7.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-07-17 18:59 UTC, gpowers
Details
Testfile with Long Password (docx) (7.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-07-17 19:14 UTC, gpowers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gpowers 2017-07-17 18:57:49 UTC
Description:
Is there anyone examining this issue? I'm experiencing difficulty encrypting Writer 5.0.3.2 files with special characters. Was under the impression I was losing my mind, but I was able to replicate the issue with a new document.

Is there an issue with the comparison boxes in Writer? I could not break it, but if there is a mismatch that passed, it may explain the failure. That's all I have -- underscore, a number, and an ampersand. (English, US, UTF-8)

Steps to Reproduce:
 1. Open Writer with new file.
 2. Click to save and check, "Save with Password."
 3. When prompted, use "Sp3ci&l_Chars" without quotes in each box.
 4. Close document.
 5. Open document.
 6. When prompted, re-enter "Sp3ci&l_Chars" without quotes in password.
 7. Decryption fails.

Actual Results:  
Could not decrypt Writer document.

Expected Results:
File decrypted, normally.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Comment 1 gpowers 2017-07-17 18:59:39 UTC Comment hidden (obsolete)
Comment 2 gpowers 2017-07-17 19:13:12 UTC
This was a .docx attempt - insert Step 2a. to set document type to, "Microsoft Word 2007-2013 XML (.docx)" prior to saving.

Unfortunately, I was not able to reproduce the original error. However, in my testing, I discovered that my issue seems to be related to the length of the password? The private password was 16 characters. When truncated to 15, it decrypted the document, correctly.

So, new test case. I've uploaded a file with the following password: '12345678901234567890' (length = 20) -- when attempting to decrypt, the full password does not work. However, using the truncated, fifteen character version ('123456789012345') the document opens.
Comment 3 gpowers 2017-07-17 19:14:33 UTC
Created attachment 134697 [details]
Testfile with Long Password (docx)

Encrypted with Password = 12345678901234567890 (Does not work)
Password to Decrypt = 123456789012345 (<16 characters)
Comment 4 gpowers 2017-07-17 19:15:06 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2017-07-17 20:49:43 UTC Comment hidden (obsolete)
Comment 6 gpowers 2017-07-23 22:23:52 UTC
LibreOffice/LibreWriter Upgrade Completed. Now:
  Version: 5.3.4.2
  Build ID: 1:5.3.4-0ubuntu0.14.04.1~lo0
  CPU Threads: 4; OS Version: Linux 3.19; UI Render: default; VCL: gtk2; Layout 
  Engine: new; 
  Locale: en-US (en_US.UTF-8); Calc: group

Password length is limited to 15 characters with dialog box/error message. Cannot create password for .docx files that is longer than this length. Instead of fixing the issue, it seems the input was limited to accommodate.

No limitation exists in MS Word 2016. Created test document with password of 20 character length. LibreWriter was able to open without a problem.

Is there an issue with creating a strong password for .docx files? Does the encryption match that used by MS Word, and if so, why is the length of the password limited?
Comment 7 Buovjaga 2017-08-11 17:36:50 UTC

*** This bug has been marked as a duplicate of bug 97086 ***