summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-07-02 13:24:38 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-07-02 20:01:50 +0200
commit8b333575ee680664fa3d83249ccec90881754ad7 (patch)
tree2a353d5adb6532ee69d66799147615627f95e712
parent67dca5a47d1be1b38edee7d0d81fa9adfce5a22e (diff)
sfx2: SfxObjectShell should not trust any signature on repaired package
Change-Id: I0317f80989e9dabd23e88e3caab26ede3fb5bd56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169883 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--sfx2/source/doc/objserv.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 428e4d2d9d0c..fcfa222bf588 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1911,6 +1911,12 @@ SignatureState SfxObjectShell::ImplGetSignatureState( bool bScriptingContent )
{
SignatureState* pState = bScriptingContent ? &pImpl->nScriptingSignatureState : &pImpl->nDocumentSignatureState;
+ // repaired package cannot be trusted
+ if (GetMedium()->IsRepairPackage())
+ {
+ *pState = SignatureState::BROKEN;
+ }
+
if ( *pState == SignatureState::UNKNOWN )
{
*pState = SignatureState::NOSIGNATURES;