Problem description: When I save the document in MS-Word 97-Format and encrypt it with the Phrase "Herr, deine Liebe", it is not possible to open in neither in Word nor in LibreOffice Steps to reproduce: 1. Create a Text-Document 2. Save it in MS-Word 97-Format, choosing, encrypt, giving twice the Password: Herr, deine Liebe 3. Try to open it, give above Phrase as the password Current behavior: Errormessage: Password is wrong, file can't be opened. Expected behavior:Open the document. (Or at least give a warning, when I save the file, that the document can't be restored. Operating System: Windows XP Version: 4.0.3.3 release
One further note: When I used "test13" as a password or when I saved the file using odf-Format everything worked just fine.
And if I saved the file as docx, without warning it opened without any password at all.
> Problem description: When I save the document in MS-Word 97-Format and > encrypt it with the Phrase "Herr, deine Liebe", it is not possible to open > in neither in Word nor in LibreOffice Did you mean the password is: Herr, deine Liebe ? If yes, it's not possible because too many characters. We can only entry: Herr, deine Lie LO 4.0.4.1 (Win7 32bit)
Yes, that was the password. It probably would help, if the dialogue would give a hint, how many charakters the password could have. Thanks a lot for your work. I really appreciate LibreOffice. Hanno Am Freitag, 7. Juni 2013 schrieben Sie: > https://bugs.freedesktop.org/show_bug.cgi?id=65492 > > ign_christian <ign_christian@yahoo.com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|UNCONFIRMED |NEEDINFO > CC| |ign_christian@yahoo.com > Ever confirmed|0 |1 > > --- Comment #3 from ign_christian <ign_christian@yahoo.com> --- > > Problem description: When I save the document in MS-Word 97-Format and > > encrypt it with the Phrase "Herr, deine Liebe", it is not possible to open > > in neither in Word nor in LibreOffice > > Did you mean the password is: Herr, deine Liebe ? > If yes, it's not possible because too many characters. > We can only entry: Herr, deine Lie > > LO 4.0.4.1 (Win7 32bit) > > -- > You are receiving this mail because: > You reported the bug. >
So marking NEW enhancement, similar case with XLS file on Bug 43452 Password for open file when saving as DOC limited to 15 characters. Don't know from developer side whether it's possible or at least should be a hint dialogue box as presented on comment 4.
This bug is no longer reproducible with LO 4.4.1.2, Win 8.1: Saving as odt file: Longer passwords are now possible. Saving as doc/docx file: Message occurs: "The inserted text exceeded the maximum length of this text field. The text was truncated." Can anybody else reproduce it or can we close it as Resolved?
LO can still only open DOCs, which password is 15 characters max. But Word 2013 has the same limit, so LO is compatible to MS Office 2013.(Though, I tested the limit with MS Word 2007. It supports longer passwords. So, if you have to open an old DOC with a longer password, you need an older version of MS Office.)
(In reply to Mike from comment #7) > Though, I tested the limit with MS Word 2007. It supports longer > passwords. So, if you have to open an old DOC with a longer password, you > need an older version of MS Office. Just tested with Word 2007 (12.0.6784.5000) SP3: created a new document, saved as DOC, and set its encryption password to 16-character "1234567890123456". It swallowed the password (although asked me if I want to use DOCX instead because of stronger encryption), and then trying to open the document using the same 16-character password failed, while entering the first 15 characters allowed me to successfully open the document. So was there actually a version that allowed to use more than 15 characters of password for binary documents? Should the bug be closed NOTABUG (or concentrate on proper indication of limiting entered password - something the person entering the password might not notice), or set to NEEDINFO asking for a sample of (or specific steps to get) such a document?
Created attachment 150386 [details] A .DOC encrypted with 30-character password "123456789012345678901234567890" (In reply to Mike Kaganski from comment #8) I was able to reproduce the problem, even using Word 2016: setting an arbitrary-length password to a DOCX, and then re-saving it as DOC, keeps the long password.
See the spec, section 20 for more info. MSO up to 2003 only supported 15 characters, but 2007 and 2010 supported longer up to 255. Applies to XLS, but assume it's the same for DOC https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-xls/a3ad4e36-ab66-426c-ba91-b84433312068 LO 3.3 exhibits the same behavior, can only save with 15 characters, so assume this is inherited
(In reply to hp.web from comment #4) > It probably would help, if the dialogue would give a hint, > how many characters the password could have. The typing hint (during save) exists now in LO 7.0 thanks to bug 43452. The open dialog itself does not (and should not) limit the characters to 15. However, I could not open an xls file with a 16 character password created by Excel 2016. The code that handles the password checking for xls seems to be in comphelper/source/misc/docpasswordhelper.cxx DocPasswordHelper::requestAndVerifyDocPassword() I also am not able to open Mike's document from comment 9 in LO. The code that handles the password checking for doc seems to be in sw/source/filter/ww8/ww8par.cxx Init97Codec()
Sample code that allows copy/pasters to open XLS files with a too-long password. https://gerrit.libreoffice.org/c/core/+/96777
Sample code that allows copy/pasters to open DOC files when typing or pasting a password larger than the maximum length. https://gerrit.libreoffice.org/c/core/+/96868
Providing support for longer than 15 character passwords probably requires a fairly major overhaul. (For .doc I could extend that to 16 characters just by - if ( nLen <= 15 ) + if ( nLen <= 16 ) in Init97Codec, but higher numbers didn't work, probably because "16" is hardcoded all over the place in filter/source/msfilter/mscodec.cxx. This is not an area I should be contributing to anyway, so that's as far as I will investigate.
*** Bug 131313 has been marked as a duplicate of this bug. ***