We can't "add" the password security to Basic Macro Library. We checked reappearance of this probrem in 4.4.0.1 Writer/Calc/Draw on Windows8.1 and Calc on Debian Linux. Steps to reproduce: 1. File> New> Text document 2. Tools> Macros> Organize> LibO Basic, click Organizer, tab Libraries, location:Untitled 1, click New, name Library1, Ok (You can "set" the password at this time) 3. Save the document and *close it*. 4. Reopen the document 5. Tools> Macros> Organize> LibO Basic, click Organizer, tab Libraries, location:Untitled 1 6. do some operation related to password setting (concrete examples are described after) 3. Save the document and *close it*. 4. Reopen the document 7. password setting has failed Operation exampes in Step6 and there results: 1. make new Library, but don't set the password. * no problem. we can get expected result. 2. make new Library, and immediatery after that, set the password. * password lock will be lost. * Module following the Library will be absent. * illegal display of [LibreOffice Basic] window, opend with the [Edit] button in Organazer Libraries tab. 3. make new Library, and set the passowrd after edit the Library. * password lock will be lost, but contents of Library will be kept. 4. "add" the password to existing Library with no password. * password lock will be lost. * edit which made after the last Save befor set the password will be lost.
I can confirm with Version: 4.5.0.0.alpha0+ Build ID: 2116f1cfb31e5fcf829c2f101cd878a32b56c365 TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-12-19_05:59:03 Tried 6./2. - I have both libraries, but without password * password lock will be lost. -> setting higher priority
I can confirm this as well.
In OpenOffice a password can be set for a library. Once there is a password associated with the library, even LibreOffice keeps the password and handles everything correctly (except the 65k limit per module). The password is retained even after storing the library.
It happened sometime between 4.1.1.2 and 4.2.8.2
Maybe bugs #68983 and #42899.
With 4.2.4.2 it works. With 4.2.5.2 the whole content of the Basic library is lost after applying a password and reloading the ODB file. With 4.2.8.2 the library is retained, but no password is applied. After reloading the ODB file, I can open the library without having to enter the password that I previously set.
With 4.2.6.3 the whole content of the Basic library is lost after applying a password and reloading the ODB file.
With 4.4.4.3 modules were lost in one try, and password is never saved. Hope it will be fixed soon.
Works in Apache OpenOffice 4.1.1 If the Library is protected in OpenOffice it has to be unlocked by password in Libreoffice Version 4.4.4.3.
93615bca59da819a9b93a6d3b9cc880ac6d9fdfa is the first bad commit commit 93615bca59da819a9b93a6d3b9cc880ac6d9fdfa Author: Matthew Francis <mjay.francis@gmail.com> Date: Sat Mar 14 19:47:06 2015 +0800 source-hash-5246fa262450f686674850c53df666422f441c86 commit 5246fa262450f686674850c53df666422f441c86 Author: Michael Stahl <mstahl@redhat.com> AuthorDate: Wed May 21 22:26:05 2014 +0200 Commit: Michael Stahl <mstahl@redhat.com> CommitDate: Thu May 22 13:12:55 2014 +0200 fdo#68983: basic: if the library is not loaded fully, copy source storage Also fixes fdo#42899 and fdo#67685 in a different way; the previous fix for fdo#42899 caused the problem with password-protected libraries for which the password is not known: only the binary representation of the BAISC module was stored, not the source code; by simply copying from the source storage the problem can be avoided. It would be possible to ask for the password when storing, but that would not work when non-interactive (called via API). An alternative fix would be to pass in the SfxObjectShell::IsSetModifyEnabled() flag and actually reset the BASIC library's modify flag correctly, but that requires adding a parameter to XStorageBasedLibraryContainer::storeLibrariesToStorage(). (regression from af34774d260a68fc02cd78ba90dd8d4afaf1a2a4 ) Change-Id: I4701401f35171139fc2fe8d225d13d4e533091a0 :040000 040000 6e740902a1eae6647cd280d3727938dcac9ee46c 7bbf2b151d50f57c9f2a75075571235ee0c27c9c M opt
Michael, could you have a look into this, please?
*** Bug 92922 has been marked as a duplicate of this bug. ***
Could anyone who knows the code have a look? The issue is already bibisected. The comment in the original check-in suggests another solution. I would gladly test this and the other related issues fdo#42899 and fdo#67685 once a fix is available.
Is password protection for macros officially still supported? This was broken 1,5 years ago. Best regards, Gerhard
Migrating Whiteboard tags to Keywords: (bibisected)
Could you please fix that regression so that one does not need OpenOffice to create a password to use with LibreOffice?
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=aeb43916366b293935314efe9454c66b4877b9d1 basic: tdf#87530 don't copy storage that doesn't exist It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=6a351c5cf91d0f667168d834ba2eb5c04121c7d5 basic: tdf#87530 if a new password is set, must set mbLoadedSource flag It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Wow, great. Many thanks. Much appreciated. I just noticed that my previous comment apparently was sent three times. Sorry about that. No idea how this happened. I remember that I got a mid air collision message for my own comment for some reason.
sorry that bug somehow removed itself from my todo-list... the patch from comment #19 should fix the operation 2. from description the patch from comment #20 should fix the operation 3./4. from description fixed on master
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=7faecc70c286c0e1a3068b77ccde771640928b37 tdf#87530 finish the regression test It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e93270fae07be68a92bdb7d6d964a54412ce983c&h=libreoffice-5-1 basic: tdf#87530 don't copy storage that doesn't exist It will be available in 5.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a93f26304e21e257aaf6914e0f8607c80fb912af&h=libreoffice-5-1 basic: tdf#87530 if a new password is set, must set mbLoadedSource flag It will be available in 5.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b3f2b2529dc4ed313f423d29551577b6dfed4258&h=libreoffice-5-0 basic: tdf#87530 don't copy storage that doesn't exist It will be available in 5.0.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2317420ecee0bf2f01f1555fdaaa56dc9fd6a9c8&h=libreoffice-5-0 basic: tdf#87530 if a new password is set, must set mbLoadedSource flag It will be available in 5.0.6. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 93749 has been marked as a duplicate of this bug. ***