Download it now!
Bug 127048 - Macro warning dialog is prompted in a file with no macro
Summary: Macro warning dialog is prompted in a file with no macro
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0 target:6.3.2
Keywords: bibisected, bisected, regression
: 127578 127614 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-08-20 09:28 UTC by Xisco Faulí
Modified: 2019-09-18 08:00 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2019-08-20 09:28:56 UTC
Steps to reproduce:
1. Open attachment 153248 [details] from bug 126784

-> Macro warning dialog is displayed

Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: 686b3b5bfc8caac0d5db7c9845fafd32250281e2
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2019-08-20 09:29:50 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=b3edf85e0fe6ca03dc26e1bf531be82193bc9627

author	Caolán McNamara <caolanm@redhat.com>	2019-08-07 17:37:11 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2019-08-13 13:26:15 +0200
commit	b3edf85e0fe6ca03dc26e1bf531be82193bc9627 (patch)
tree	62887e38b2f0b06ca8e74fffd126560b5b0c8049
parent	c78dd0a726b32d922a0d75a26a51d4c30612368c (diff)
warn on load when a document binds an event to a macro

Bisected with: bibisect-linux64-6.4

Adding Cc: to Caolán McNamara
Comment 2 Caolán McNamara 2019-08-20 10:19:11 UTC
The .doc does however contain a non-zero lcbCmds field which is a "user customization" which then can contain "a structure that specifies macro commands" so the document contains a mechanism to trigger calling macros. Which is the sort of thing I wanted additional warnings about.

Its an obscure ms doc feature, and we just seem to store the little hunk of data and restore it on resave to .doc, rather than process it, so in this case it might be seen as overkill. Not sure whether we want to disable the warning for this case, I'm assuming use of these "Cmds" is rare.
Comment 3 Caolán McNamara 2019-08-21 15:19:55 UTC
I can move the warning from presence of this data, to if we attempt to import something based on its existence.
Comment 4 Commit Notification 2019-08-21 18:45:26 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#127048 loosen warning from presence to if parsed

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 5 Caolán McNamara 2019-08-21 18:52:23 UTC
fixed in master for this case where the data causes nothing potentially unsafe to be added to the document, backport to 6-3 in gerrit
Comment 6 Commit Notification 2019-08-29 08:35:50 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

Resolves: tdf#127048 loosen warning from presence to if parsed

It will be available in 6.3.2.

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 7 Xisco Faulí 2019-09-02 13:03:48 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 41cd3e8e817c8c33a13608e62eeb06ce2c6977e4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!! Does it need to be backported to 6-2 branch ?
Comment 8 Xisco Faulí 2019-09-16 15:13:38 UTC
*** Bug 127578 has been marked as a duplicate of this bug. ***
Comment 9 Caolán McNamara 2019-09-16 15:20:18 UTC
my understanding is that the 6-2 backport included that additional tweak already
Comment 10 Xisco Faulí 2019-09-16 15:30:28 UTC
(In reply to Caolán McNamara from comment #9)
> my understanding is that the 6-2 backport included that additional tweak
> already

Yes, you're right. I've just checked it in

Version: 6.2.8.0.0+
Build ID: e49eb6c9968f3ccc4e24c3f0444221c20aefb7aa
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

Sorry for the noise
Comment 11 Caolán McNamara 2019-09-18 08:00:29 UTC
*** Bug 127614 has been marked as a duplicate of this bug. ***