[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 Buovjaga changed: What|Removed |Added CC||ilmari.lauhakangas@libreoff ||ice.org, ||vasily.melenc...@cib.de Status|UNCONFIRMED |NEW Keywords||bibisected, bisected, ||regression Regression By||Vasily Melenchuk Version|7.0.2.2 release |7.0.3.1 release Ever confirmed|0 |1 --- Comment #10 from Buovjaga --- It hangs for me as well and I tested with linux-64-7.0 bibisect repo and confirm the finding. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 --- Comment #9 from Ross Johnson --- (In reply to libreoffice from comment #4) > I tried to rewrote this part to fix this use-case: > > ``` > // Also, ( maybe the new itemset contains new values, otherwise they will be > empty ) > bool bPasswordProtected = true; > > if (xMergedParams->HasItem(SID_ENCRYPTIONDATA)) > { > const SfxUnoAnyItem* pEncryptionDataItem > = xMergedParams->GetItem(SID_ENCRYPTIONDATA, > false); > if (pEncryptionDataItem) > { > uno::Sequence aEncryptionData; > pEncryptionDataItem->GetValue() >>= aEncryptionData; > for (const auto& rItem : std::as_const(aEncryptionData)) > { > if (rItem.Name == "CryptoType") > { > OUString aValue; > rItem.Value >>= aValue; > if (aValue != "StrongEncryptionDataSpace") > { > // This is not just a password protected document. > Let's keep encryption data as is. > bPasswordProtected = false; > } > break; > } > } > } > }else if (xMergedParams->HasItem( SID_PASSWORD )){ > bPasswordProtected = true; > } > if (bPasswordProtected){ > // For password protected documents remove encryption data during > "Save as..." > xMergedParams->ClearItem(SID_PASSWORD); > xMergedParams->ClearItem(SID_ENCRYPTIONDATA); > } > ``` The first: bool bPasswordProtected = true; in your patch makes your 'else if' redundant, so is surely not what you intended. -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 Roman Kuznetsov <79045_79...@mail.ru> changed: What|Removed |Added Whiteboard| QA:needsComment| CC||79045_79...@mail.ru, ||xiscofa...@libreoffice.org --- Comment #8 from Roman Kuznetsov <79045_79...@mail.ru> --- Xisco, could you please look at this problem, the script and at the patch too. Thank you -- You are receiving this mail because: You are the assignee for the bug.
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 --- Comment #7 from libreoff...@neowutran.ovh --- Created attachment 170502 --> https://bugs.documentfoundation.org/attachment.cgi?id=170502=edit patch example Patch applied on my side, that apparently fix the issue. I compiled libreoffice and tested it worked as expected with my script. Nothing more. -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 --- Comment #6 from libreoff...@neowutran.ovh --- Created attachment 170500 --> https://bugs.documentfoundation.org/attachment.cgi?id=170500=edit test file -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 libreoff...@neowutran.ovh changed: What|Removed |Added Attachment #166919|0 |1 is obsolete|| Attachment #166920|0 |1 is obsolete|| --- Comment #5 from libreoff...@neowutran.ovh --- Created attachment 170499 --> https://bugs.documentfoundation.org/attachment.cgi?id=170499=edit script I used to test the regression -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 --- Comment #4 from libreoff...@neowutran.ovh --- I searched a bit deeper and found 2 regression between 6.4.X and 7.X. This ticket will be for only one of those, I will open a new ticket for other. Commit 0de0b1b64a1c122254bb821ea0eb9b038875e8d4 ( https://gerrit.libreoffice.org/c/core/+/104345 / https://github.com/LibreOffice/core/commit/0de0b1b64a1c122254bb821ea0eb9b038875e8d4 ) >From what I understand (never wrote nor read any meaningful C++ nor looked in the libreoffice codebase before). Before this commit: it checked if a password have been submit, if that is the case, then do something. After this commit: it check if the document contains encrypted data, if that is the case, then do something. This change of behavior broke at least 1 use case: Trying to open a non encrypted file using the API/uno while submitting a password. I tried to rewrote this part to fix this use-case: ``` // Also, ( maybe the new itemset contains new values, otherwise they will be empty ) bool bPasswordProtected = true; if (xMergedParams->HasItem(SID_ENCRYPTIONDATA)) { const SfxUnoAnyItem* pEncryptionDataItem = xMergedParams->GetItem(SID_ENCRYPTIONDATA, false); if (pEncryptionDataItem) { uno::Sequence aEncryptionData; pEncryptionDataItem->GetValue() >>= aEncryptionData; for (const auto& rItem : std::as_const(aEncryptionData)) { if (rItem.Name == "CryptoType") { OUString aValue; rItem.Value >>= aValue; if (aValue != "StrongEncryptionDataSpace") { // This is not just a password protected document. Let's keep encryption data as is. bPasswordProtected = false; } break; } } } }else if (xMergedParams->HasItem( SID_PASSWORD )){ bPasswordProtected = true; } if (bPasswordProtected){ // For password protected documents remove encryption data during "Save as..." xMergedParams->ClearItem(SID_PASSWORD); xMergedParams->ClearItem(SID_ENCRYPTIONDATA); } ``` (Basically, adding 1 "else if", and moving a block. Didn't sent a proper pull request yet, probably later this week) I recompiled and I confirm that with this modification it work for my usecase. Between my previous comments and now I updated my test script and input file, I will attach the new versions in this ticket. The new command is ``` ./remove_password.py /home/user/qubes-app-linux-pdf-converter/tests/files_success/csv.tmp '' ``` ("csv.tmp" is a standard csv file) With the patch, the output is ``` libreoffice process wait for socket :file:///home/user/qubes-app-linux-pdf-converter/tests/files_success/csv.tmp: ``` , the process terminate within seconds and the file is correctly created. Without the patch, the output is ``` libreoffice process wait for socket :file:///home/user/qubes-app-linux-pdf-converter/tests/files_success/csv.tmp: ``` , the process does not terminate (hang indefinitly), and when I send a "CTRL+C" it display the following error "__main__.ErrorCodeIOException: SfxBaseModel::impl_store failed: 0x20d(Error Area:Io Class:General Code:13) /home/user/core/sfx2/source/doc/sfxbasemodel.cxx:3153 " -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 QA Administrators changed: What|Removed |Added Whiteboard|| QA:needsComment -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 --- Comment #3 from libreoff...@neowutran.ovh --- To make it easier to debug I only attached 1 test file ("docx.docx"), this document is NOT protected by a password. But the issue is also producible with password protected file -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 --- Comment #2 from libreoff...@neowutran.ovh --- Created attachment 166920 --> https://bugs.documentfoundation.org/attachment.cgi?id=166920=edit script -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
[Libreoffice-bugs] [Bug 137926] storeAsURL regression between libreoffice < 7 and libreoffice >=7
https://bugs.documentfoundation.org/show_bug.cgi?id=137926 --- Comment #1 from libreoff...@neowutran.ovh --- Created attachment 166919 --> https://bugs.documentfoundation.org/attachment.cgi?id=166919=edit test file -- You are receiving this mail because: You are the assignee for the bug.___ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs