Bug Hunting Session
Bug 52076 - Macro security warning persists when all macros and modules are deleted.
Summary: Macro security warning persists when all macros and modules are deleted.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: Other All
: high trivial
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:4.4.0 target:4.3.1
Keywords:
: 38230 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-14 09:12 UTC by Peter Toye
Modified: 2014-09-25 12:22 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
idea to be tested (795 bytes, patch)
2014-07-24 08:49 UTC, Lionel Elie Mamane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Toye 2012-07-14 09:12:50 UTC
Adding and then deleting a macro does not result in the macro security warning being cancelled.

Action: Make a new database, go to Tools|Macros|Organise|Basic and CLick "New". Save the resulting file. Open it and the security warning appears. 

Go back into Tools|Macros.... and delete the module. Save the result. There are now now macro modules in the database.

Open the file and the security warning appears. I don't think it should.

Opening the file with a packer such as WinZip and deleting the "Basic" folder gets rid of the problem. But this shouldn't really be necessary.
Comment 1 Joel Madero 2012-09-07 02:37:18 UTC
Confirmed and I agree, a bit annoying. Marking as NEW and prioritizing. Thanks for reporting.

Marked as TRIVIAL - HIGH as I don't see this affecting many users and while it's annoying, it doesn't prevent users from making high quality work. Marked as HIGH because I do think it could reflect poorly on LO for those who would ever see this issue. We'll see what we can do to get it solved.
Comment 2 Joel Madero 2012-09-07 02:48:49 UTC
@Noel, was told by Moggi that you know the basic code quite well. Would this be something you could take care of?
Comment 3 Noel Power 2012-09-10 09:07:30 UTC
I will take this ( for the moment ) and try and see what the problem is. It does appear in 3.4 at least the Basic dir was deleted when the last module was removed.
Comment 4 Lionel Elie Mamane 2014-07-24 07:06:54 UTC
*** Bug 38230 has been marked as a duplicate of this bug. ***
Comment 5 Lionel Elie Mamane 2014-07-24 07:14:26 UTC
Noel, it looks like you intended to fix this with

commit c0c7fb66985a9a3e8f9b7a796c1e0489e407879b
Author: Noel Power <noel.power@suse.com>
Date:   Tue Sep 11 10:28:51 2012 +0100

    fix for fdo#52076 don't write out basic storage if no modules
    
    Change-Id: I50908f7f6b4c9a146e4a2fe616d000e1ee7e36fe

(and the following clean-up), but the bug entry in bugzilla has not moved. Anyway, this bug is still reproducible (or has regressed since then), at least for .odb files (see bug 38230). This story of saving Basic & Dialog libraries has in the past been the subject of commits by yourself and Michael Stahl (wrt bug 68983, bug 42899, bug ), so I'm putting this issue in your (plural you = Noel + Michael) hands, you are probably the people that understand this code the best.

I'm not quite sure how to solve this, without reintroducing bug 40173 either...
Comment 6 Lionel Elie Mamane 2014-07-24 08:49:20 UTC
Created attachment 103392 [details]
idea to be tested

What about something like this patch? Julien, can you test it?
Comment 7 Commit Notification 2014-07-24 15:35:53 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1392a88c2540bc06381680d664129eb79c8b75fc

fdo#52076 remove empty library instead of writing it out empty



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 8 Julien Nabet 2014-07-24 16:08:05 UTC
Sorry Lionel, I hadn't cc'ed myself this tracker.
Given that the patch pushed is slightly different from your idea, I suppose it's ok now.
Comment 9 Lionel Elie Mamane 2014-07-24 16:14:11 UTC
(In reply to comment #8)
> Sorry Lionel, I hadn't cc'ed myself this tracker.
> Given that the patch pushed is slightly different from your idea, I suppose
> it's ok now.

Yes, thanks. I found the time to test it out. The basic idea was there, but the first patch confused library name ("Standard") and directory name in the ZIP structure (Dialogs or Basic).
Comment 10 Commit Notification 2014-07-29 14:12:02 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#52076 remove empty library instead of writing it out empty


It will be available in LibreOffice 4.3.1.

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-09-04 10:12:50 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

fdo#52076 remove Library dir when no library



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-09-04 10:13:07 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

fdo#52076 unittest



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-09-25 12:19:25 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#52076 remove Library dir when no library


It will be available in LibreOffice 4.3.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 Commit Notification 2014-09-25 12:22:25 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#52076 unittest


It will be available in LibreOffice 4.3.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.