uui/source/secmacrowarnings.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 8a2820193315e8f56a041153ca5578ce7bdcb832 Author: Samuel Mehrbrodt <[email protected]> AuthorDate: Thu Dec 7 13:30:51 2023 +0100 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Thu Dec 7 18:59:20 2023 +0100 tdf#158576 Require viewing the certificate before adding it to the list of trusted certificates. This prevents certificates from being thoughtlessly added to the list of trusted certificates. Change-Id: Ifd0273df39f13432ebad72f1289ede0e6e7a8d5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160427 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <[email protected]> diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 9ecdc9afa1d9..6b4102632755 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -103,9 +103,15 @@ IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl, weld::Button&, void) { xD->setParentWindow(m_xDialog->GetXWindow()); if( mxCert.is() ) + { xD->showCertificate( mxCert ); + mxAlwaysTrustCB->set_sensitive(true); + } else if( mxStore.is() ) + { xD->showScriptingContentSignatures( mxStore, uno::Reference< io::XInputStream >() ); + mxAlwaysTrustCB->set_sensitive(true); + } } } @@ -147,6 +153,7 @@ void MacroWarning::InitControls() // show signature controls? if (mbShowSignatures) { + mxAlwaysTrustCB->set_sensitive(false); mxViewSignsBtn->connect_clicked(LINK(this, MacroWarning, ViewSignsBtnHdl)); mxViewSignsBtn->set_sensitive(false);
