Bug Hunting Session
Bug 42316 - Creating a new document from a template removes the signature from all Macros
Summary: Creating a new document from a template removes the signature from all Macros
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.4.3 release
Hardware: All All
: medium minor
Assignee: Jan-Marek Glogowski
URL: http://openoffice.org/bugzilla/show_b...
Whiteboard: target:6.4.0 target:6.3.1 target:6.3.4
Keywords:
Depends on:
Blocks: Digital-Signatures 119507
  Show dependency treegraph
 
Reported: 2011-10-27 10:56 UTC by Jelko Arnds
Modified: 2019-10-17 08:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file with macro signed (by chanon) (10.00 KB, application/vnd.oasis.opendocument.text-template)
2011-10-27 10:56 UTC, Jelko Arnds
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jelko Arnds 2011-10-27 10:56:44 UTC
Created attachment 52829 [details]
Example file with macro signed (by chanon)

--transfered from old OpenOffice Bugzilla--
Bug 76318
http://openoffice.org/bugzilla/show_bug.cgi?id=76318
Reported: 2007-04-12 16:35 by chanon <chanon@openoffice.org>
Original attachment included.

The bug is still not fixed and occurs in the current LibreOffice version. It's totally annoying if you work with macros and templates for a group of users of medium/large size. Please fix this.

--Original Description:--
Using Trusted Sources with certificates for Macro Security is difficult with
templates. 

When a new document is created based on a template (.ott) file, all the
signatures are removed, including the ones related to the security of the Macro
modules (Basic). So when the newly created document (based on the template with
 signed module) is reopen by the user, he is prompted again to enable/disable
macros (while the content of the macro module itself is not modified).

How to reproduce:
Sign the macro of a new document (Tools > Macros > Digital Signature) and save
it as a template e.g BugExample128.ott.

Ensure that the settings for Macro security (Tools > Options > OpenOffice.org >
Security > Macro Security  : Security Level set to Medium and trusted Source >
Trusted certificates should contain the certificate used for signing.

Start Writer, file Open and selects the template in my case BugExample128.ott:
a new document UntitledX will open. And the macro signature is gone!

Although this may look compatible with the initial requirements. I think this
not the best possible behavior.
Comment 1 sasha.libreoffice 2012-03-06 07:34:38 UTC
Thanks for bugreport
Please, verify if in last version of LibreOffice still reproducible
Comment 2 QA Administrators 2013-05-26 22:31:28 UTC Comment hidden (obsolete)
Comment 3 Jelko Arnds 2013-07-03 18:07:30 UTC
This bug still persists. Testet it with LibreOffice 4.0.3 today.
If you need any more info to resolve the problem, i would be glad to help.
Comment 4 Mike Kaganski 2013-08-04 08:12:29 UTC
Still reproducible with LO 4.1.0.4 under Win7x64.
Comment 5 QA Administrators 2015-06-08 14:41:23 UTC Comment hidden (obsolete)
Comment 6 Buovjaga 2015-06-21 17:01:19 UTC
Confirmed. With High setting, .ott says it contains a signed macro. After saving the document, no such message.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-19_23:16:58
Locale: fi-FI (fi_FI)
Comment 7 QA Administrators 2016-09-20 10:09:44 UTC Comment hidden (obsolete)
Comment 8 Jelko Arnds 2016-10-01 16:07:25 UTC
This bug is still present in LibreOffice 5.2.2.2 (tested on Mac Os X 10.11.5). Behavior is the same as before.
Comment 9 QA Administrators 2018-02-01 03:44:30 UTC Comment hidden (obsolete)
Comment 10 Commit Notification 2019-08-06 18:56:50 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c3a1c83ff5af05d34f433ac808adbe85f47e8c18%5E%21

tdf#42316 preserve macro signature of templates

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2019-08-07 21:29:59 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/decdd8a8fb5524cb1cc1837e8566812e8039e73d%5E%21

tdf#42316 preserve macro signature of templates

It will be available in 6.3.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2019-10-16 11:45:35 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4aa6e2cb2245eddab87fb451add94159a7604246

tdf#42316 handle saving to template filters

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2019-10-17 08:54:09 UTC
Jan-Marek Glogowski committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/7b405877b0fa0145513ac0294ab51cf57e6108c6

tdf#42316 handle saving to template filters

It will be available in 6.3.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.