summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-11-07 13:38:33 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-11-07 17:38:33 +0100
commit505f97b5b23954d689d55640977da6ec1af523b9 (patch)
tree262e9333bb5bf259d60ca6bb015028ecf8329e62 /sfx2
parent0054f303b030c2f552d9977a24b8e860b0ca15e0 (diff)
Add a description comment
Basically describing commit 71c6f438cecc3ce5e8060efe1df840652885701c (tdf#129311 don't allow temporary trusted certs, 2019-12-17). Change-Id: I4d947014b09412638560e9249f242cf6ff222cc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159069 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docmacromode.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index ec56e3f529e7..637f137866ba 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -189,6 +189,13 @@ namespace sfx2
// check whether the document is signed with trusted certificate
if ( nMacroExecutionMode != MacroExecMode::FROM_LIST )
{
+ // At this point, the possible values of nMacroExecutionMode are: ALWAYS_EXECUTE,
+ // FROM_LIST_AND_SIGNED_WARN (the default), FROM_LIST_AND_SIGNED_NO_WARN.
+ // ALWAYS_EXECUTE corresponds to the Medium security level; it should ask for
+ // confirmation when macros are unsigned or untrusted. FROM_LIST_AND_SIGNED_NO_WARN
+ // should not ask any confirmations. FROM_LIST_AND_SIGNED_WARN should only allow
+ // trusted signed macros at this point; so it may only ask for confirmation to add
+ // certificates to trusted, and shouldn't show UI when trusted list is read-only.
// the trusted macro check will also retrieve the signature state ( small optimization )
const bool bAllowUI = nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN
&& (nMacroExecutionMode == MacroExecMode::ALWAYS_EXECUTE