Bug 68983 - "Save As" a document containing a macro library protected by password corrupts the password of the macro library
Summary: "Save As" a document containing a macro library protected by password corrupt...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: Other All
: highest critical
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:4.3.0 target:4.2.5
Keywords: regression
: 68981 (view as bug list)
Depends on:
Blocks: mab4.2 93749
  Show dependency treegraph
 
Reported: 2013-09-05 13:37 UTC by pierre-yves samyn
Modified: 2016-04-06 10:08 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
LibraryPassword.odt (after step 5) (10.26 KB, application/vnd.oasis.opendocument.text)
2013-09-05 13:37 UTC, pierre-yves samyn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pierre-yves samyn 2013-09-05 13:37:11 UTC
Created attachment 85255 [details]
LibraryPassword.odt (after step 5)

Hello

May be related to bug 68981
	
"Save As" a document containing a macro library protected by password corrupts the password of the macro library

Steps to Reproduce:

Open the attached LibraryPassword.odt document and continue to step 6, or follow steps 1-5 below and continue.

1. File> New> Text document
2. Tools> Macros> Organize> LibO Basic, click Organizer, tab Libraries, location:Untitled 1, click New, name Library1, Ok
3. Click Password: foo (confirm), Ok
4. Click Edit: in Module1 of Library1, create the following macro:

sub Main
msgbox "Hello"
End Sub

5. Save the document and *close it*.
6. Reopen the document
7. File> Save As> Test.odt 
8. Tools> Macros> Organize> LibO Basic> Test.odt > Library1
Type the password (foo).

Expected result: password verified and ability to edit
Actual result: error message "Incorrect Password", access denied

Remarks: Bug vicious, macros always work and you can not see that the library cannot be edited

Best regards
Pierre-Yves
Comment 1 pierre-yves samyn 2013-10-11 09:11:18 UTC
Hello

Still occurs on windows 7 with Version: 4.1.3.1
Build ID: b42498da0e3f91b17e51b55c8295ec4f8f22087

Regards
Pierre-Yves
Comment 2 m_a_riosv 2013-10-20 11:40:38 UTC
Reported in AOO Spanish forum:
http://forum.openoffice.org/es/forum/viewtopic.php?f=50&t=9032
Comment 3 Björn Michaelsen 2014-01-17 09:51:53 UTC
(This is an automated message.)

Setting priority to highest as this is a 4.1 MAB. This is part of an effort to make the importance of MAB reflected in priority too.
Comment 4 jmxhyz 2014-04-21 09:25:28 UTC
Still occurs on ubuntu 14.04 with Version: 4.2.4.1
Build ID: d4c441391e20647b3d2e8dde4d20aa868e77e515
Comment 5 tommy27 2014-05-04 01:05:20 UTC
moving to the mab4.2 list since 4.1.x is end of life
Comment 6 Michael Stahl (allotropia) 2014-05-07 21:33:58 UTC
regression in LO 4.0.4.2 from:

commit c2816cf4b51fd84aa530653acaa48112bb55a4a6
Author:     Noel Power <noel.power@suse.com>
AuthorDate: Wed May 8 20:48:22 2013 +0100

    hopefully this fixed the strange autorecovery related dataloss fdo#42899
    
this is looking pretty bad, the META-INF/manifest.xml is missing
the encryption data ... actually it is missing the whole entry for Module1.xml

 <manifest:file-entry manifest:full-path="Basic/Standard/script-lb.xml" manifest:media-type="text/xml"/>
 <manifest:file-entry manifest:full-path="Basic/script-lc.xml" manifest:media-type="text/xml"/>
 <manifest:file-entry manifest:full-path="Basic/Library1/Module1.bin" manifest:media-type=""/>
 <manifest:file-entry manifest:full-path="Basic/Library1/script-lb.xml" manifest:media-type="text/xml"/>
Comment 7 Noel Power 2014-05-22 08:56:57 UTC
https://gerrit.libreoffice.org/#/c/9431/ is a possibly patch, seems to work on a quick test, I'd love if someone could give this a really good whirl (in particular with other saving scenarios (e.g. mixed libraries and/or dialogs etc.) unfortunately these days my time is limited :/
Comment 8 Commit Notification 2014-05-22 11:18:59 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0e21019e0d61911b4c0ddef07691e9f9f6384cba

fdo#68983: Revert "remove #if 0 block (from ...



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.
Comment 9 Commit Notification 2014-05-22 11:19:34 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5246fa262450f686674850c53df666422f441c86

fdo#68983: basic: if the library is not loaded fully, copy source storage



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.
Comment 10 Commit Notification 2014-05-22 15:14:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1926ab7e68be80eb5431a0a11a45e3d5eccf0f50&h=libreoffice-4-2

fdo#68983: Revert "remove #if 0 block (from ...


It will be available in LibreOffice 4.2.5.

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.
Comment 11 Commit Notification 2014-05-22 15:24:42 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9d2b0fd3424eaf8a685728aa7788e1148159714d&h=libreoffice-4-2

fdo#68983: basic: if the library is not loaded fully, copy source storage


It will be available in LibreOffice 4.2.5.

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.
Comment 12 Commit Notification 2014-05-26 09:51:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=25ad7c5f94be3535fcf73c0f325e864c82a084cc&h=libreoffice-4-3

fdo#68983: Revert "remove #if 0 block (from ...


It will be available in LibreOffice 4.3.

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.
Comment 13 Commit Notification 2014-05-26 09:52:23 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0aaae094c65660e3c9e7f02a71ae7e3845984532&h=libreoffice-4-3

fdo#68983: basic: if the library is not loaded fully, copy source storage


It will be available in LibreOffice 4.3.

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.
Comment 14 Michael Stahl (allotropia) 2014-05-30 18:17:53 UTC
lost track of this one...

so this was fixed by reverting the previous fix for bug 42899,
which introduced this bug, and also the fix for bug 67685 which 
was also introduced by the reverted commit, and
fixing bug 42899 differently, quite similar to what Noel
proposed in comment 7 (but slightly differently, since
i actually wrote that commit before reading Noel's comment).
Comment 15 Lionel Elie Mamane 2014-05-31 03:12:53 UTC
*** Bug 68981 has been marked as a duplicate of this bug. ***
Comment 16 pierre-yves samyn 2014-05-31 07:11:46 UTC
Hi

Verified WORKSFORME on Windows 7/64 & Version: 4.2.5.1
Build ID: 881bb88abfe2992c6cede97c23e64a9885de87de

I confirm it also solves bug 68981

Thank you :)

Regards
Pierre-Yves