Created attachment 50122 [details] ods password protected in 342 create spreadsheet in 3.4.2 save with password open in build_from_master edit and save try to open again in 3.4.2 > Error X Error in reading Subdocument ... on position .. try to open again in build_from_master > OK Version info: LibreOffice 3.5.0 Build ID: 0410bba-4eb4f62-260b7c1 Attached the document I created new (not my original password protected file) password: password
same problem when you try to open a password protected file from 35Master in 3.4.2
I have noticed this already but I was unable to reproduce it when I worked on the password code two weeks ago. I have some open work left in the password code and i will look at it when I do this. Might be that we don't use the correct algorithm at the moment. Did you try if you can open a LibreOffice 3.3 file in 3.4 or master?
hi Markus, didn't notice any problems previous, so 3.3.x > 3.4.x must be OK. Just tested: password protected from 3.3.3 opens fine in MasterBuild Looking at the errors I get: it are all errors complaining about one or another xml file ... HTH - Cor
error in console when starting 3.3 from command line and trying to open file again: librdf error URI file:///home/cono/tstPasswordFrom33ToMaster.odt/ - XML parser error: Document is empty
Hello Cor, can you reproduce this every time? I had a look at the generated manifest.xml and there are no password information saved. This file is totally invalid can neither be opened in 3.4 nor in 3.5. I had a quick look at a newly generated manifest.xml and we have a missing line in a 3-4 document: //Version master <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="settings.xml" manifest:size="7226"> <manifest:encryption-data manifest:checksum-type="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0#sha256-1k" manifest:checksum="5+tFidD/SNAtXf1fHsBcoXSEghaK6y9gb9KbdeyD4kM="> <manifest:algorithm manifest:algorithm-name="http://www.w3.org/2001/04/xmlenc#aes256-cbc" manifest:initialisation-vector="VelJ1kajLXUIeoDIkSG2Ow=="/> <manifest:key-derivation manifest:key-derivation-name="PBKDF2" manifest:key-size="32" manifest:iteration-count="1024" manifest:salt="Vrp3nZICerDtWfXs2fqVag=="/> <manifest:start-key-generation manifest:start-key-generation-name="http://www.w3.org/2001/04/xmlenc#sha256" manifest:key-size="32"/> </manifest:encryption-data> </manifest:file-entry> //Version 3.4 <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="settings.xml" manifest:size="7226"> <manifest:encryption-data manifest:checksum-type="SHA1/1K" manifest:checksum="ba3iogtlREVABXDLTrQ5d0DJIDk="> <manifest:algorithm manifest:algorithm-name="Blowfish CFB" manifest:initialisation-vector="CcoafZ9v4Rk="/> <manifest:key-derivation manifest:key-derivation-name="PBKDF2" manifest:iteration-count="1024" manifest:salt="4i1aKukpZWu2BhCTwar2Jw=="/> </manifest:encryption-data> </manifest:file-entry> //version 3.3 <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="styles.xml" manifest:size="6933"> <manifest:encryption-data manifest:checksum-type="SHA1/1K" manifest:checksum="i9UUUMTixqCE5k1mVYGt0hIG/Aw="> <manifest:algorithm manifest:algorithm-name="Blowfish CFB" manifest:initialisation-vector="YPXtGlqCoCk="/> <manifest:key-derivation manifest:key-derivation-name="PBKDF2" manifest:key-size="16" manifest:iteration-count="1024" manifest:salt="YK1YYEXehMzE3s42UVSfqA=="/> <manifest:start-key-generation manifest:start-key-generation-name="SHA1" manifest:key-size="20"/> </manifest:encryption-data> </manifest:file-entry> I think that only the master version is a valid odf 1.2 document.
When I password protect a file in 3.4.2, I can open it in 35Master When I password protect a file in 35Master I can not open it in 3.4.2, Tested again. Same pattern. (And with my initial report, I didn't notice irregulaties too ...) Typical error message: " Read error Format error discoverenr in subdocument styles.xml on position 1,n (row, column) " (But I've seen another xml-file seen mentioned too) I have no opinion on what manifest xml is the correct one. If it would help to start with gdb or ?? pls, give me a hint (or some more if needed), then I'll do my best. Can't you reproduce the error on your system?
This was a deliberate (I believe) change, see http://cgit.freedesktop.org/libreoffice/core/commit/?id=5dd2784030e00fa1857b30ee8c5da62e221bfd32 to get an encrypted documented out of master which can be opened in <= 3.4, one needs to toggle ODF 1.1 on instead of ODF 1.2 Extended in tools->options
Indeed, chosing ODF 1.0/1.1 as save format, makes it possible to open a encrypted doc from 35 Master in 342
we did this IIRC, i.e. backport support for reading these encryptions to the 3.4.X series
Right, reading AES-encrypted ODF 1.2 documents (as genereated by LibO 3.5) has been backported to LO-3-4 towards LO 3.4.5 as <http://cgit.freedesktop.org/libreoffice/components/commit/?h=libreoffice-3-4&id=c726de0c282cab62b9f1a3b51249e37224325fe9> etc.