external/libwpd/UnpackedTarball_libwpd.mk | 1 + external/libwpd/include.patch | 10 ++++++++++ include/o3tl/lru_map.hxx | 1 + sfx2/source/doc/objmisc.cxx | 6 ++++++ sfx2/source/doc/objserv.cxx | 10 ++++++++++ sfx2/source/doc/objstor.cxx | 2 ++ 6 files changed, 30 insertions(+)
New commits: commit bb6f6a1cae426eb725b2c6e0d0f900bad2453854 Author: Jeff Law <l...@redhat.com> AuthorDate: Tue Nov 3 08:05:03 2020 -0700 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Fri Aug 23 01:20:44 2024 +0200 include cstddef for gcc11 Change-Id: I2f845ce9bb660ad6c1eea80ea81dd71add2c0db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107191 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 8830cf86b146b1252ac37f351a23246088d569b0) diff --git a/include/o3tl/lru_map.hxx b/include/o3tl/lru_map.hxx index e822fde0294c..33a1487fa239 100644 --- a/include/o3tl/lru_map.hxx +++ b/include/o3tl/lru_map.hxx @@ -14,6 +14,7 @@ #include <cassert> #include <list> #include <unordered_map> +#include <cstddef> namespace o3tl { commit 92d5e2aae042b4d267bdc558725c91d93b595e72 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Nov 5 08:16:43 2020 +0100 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Fri Aug 23 01:16:16 2024 +0200 external/libwpd: Missing include for size_t ...as now reported when building with recent trunk GCC/libstdc++ on Linux: > In file included from WPXContentListener.cpp:26: > In file included from ./WPXContentListener.h:29: > ./WPXTable.h:56:31: error: unknown type name 'size_t'; did you mean 'std::size_t'? > const WPXTableCell *getCell(size_t i, size_t j) > ^~~~~~ > std::size_t Change-Id: Ic20240f01c7b0305cb87ababf53a3aaf66072d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105324 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> (cherry picked from commit 8d378abf1de0a47517427c086da26588f846592a) diff --git a/external/libwpd/UnpackedTarball_libwpd.mk b/external/libwpd/UnpackedTarball_libwpd.mk index 8d0227b9379d..eefa9331c8d6 100644 --- a/external/libwpd/UnpackedTarball_libwpd.mk +++ b/external/libwpd/UnpackedTarball_libwpd.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwpd)) $(eval $(call gb_UnpackedTarball_add_patches,libwpd,\ external/libwpd/libwpd-vs2013.patch.1 \ $(if $(SYSTEM_REVENGE),,external/libwpd/rpath.patch) \ + external/libwpd/include.patch \ )) ifneq ($(OS),MACOSX) diff --git a/external/libwpd/include.patch b/external/libwpd/include.patch new file mode 100644 index 000000000000..57f52b4b0aa5 --- /dev/null +++ b/external/libwpd/include.patch @@ -0,0 +1,10 @@ +--- src/lib/WPXTable.h ++++ src/lib/WPXTable.h +@@ -36,6 +36,7 @@ + #ifndef _WPXTABLE_H + #define _WPXTABLE_H + ++#include <stddef.h> + #include <vector> + + struct WPXTableCell commit 3d58ac1c564f9bd851d148c9eae6bd7e9a0c44e0 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Jul 2 13:24:38 2024 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Fri Aug 23 01:09:48 2024 +0200 sfx2: SfxObjectShell should not trust any signature on repaired package Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169883 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 8b333575ee680664fa3d83249ccec90881754ad7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169930 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171912 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> (cherry picked from commit d052f800991eab7011b39dee55a14f0071226d23) (cherry picked from commit 842887f165cdb199b17f7dd44c7dc92abc9651c9) (cherry picked from commit bd11f8bd6f56b853e2ef3e988366092a51ff1544) Change-Id: I0317f80989e9dabd23e88e3caab26ede3fb5bd56 diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index f372de7fe4b1..679953eb34ee 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -943,6 +943,12 @@ void SfxObjectShell::BreakMacroSign_Impl( bool bBreakMacroSign ) void SfxObjectShell::CheckSecurityOnLoading_Impl() { + if (GetErrorCode() == ERRCODE_IO_BROKENPACKAGE) + { // safety first: don't run any macros from broken package. + pImpl->aMacroMode.disallowMacroExecution(); + return; // do not get signature status - needs to be done after RepairPackage + } + uno::Reference< task::XInteractionHandler > xInteraction; if ( GetMedium() ) xInteraction = GetMedium()->GetInteractionHandler(); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 5c5b7826e075..e5ece83527a7 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1623,6 +1623,16 @@ SignatureState SfxObjectShell::ImplGetSignatureState( bool bScriptingContent ) uno::Sequence< security::DocumentSignatureInformation > aInfos = GetDocumentSignatureInformation( bScriptingContent ); *pState = DocumentSignatures::getSignatureState(aInfos); + + // repaired package cannot be trusted + if (*pState != SignatureState::NOSIGNATURES) + { + SfxBoolItem const*const pRepairItem= SfxItemSet::GetItem<SfxBoolItem>(GetMedium()->GetItemSet(), SID_REPAIRPACKAGE, false); + if (pRepairItem && pRepairItem->GetValue()) + { + *pState = SignatureState::BROKEN; + } + } } if ( *pState == SignatureState::OK || *pState == SignatureState::NOTVALIDATED diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 6d7b3f99ee69..d0e4dc627a7c 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -387,6 +387,8 @@ void SfxObjectShell::PrepareSecondTryLoad_Impl() { // only for internal use pImpl->m_xDocStorage.clear(); + pImpl->nDocumentSignatureState = SignatureState::UNKNOWN; + pImpl->nScriptingSignatureState = SignatureState::UNKNOWN; pImpl->m_bIsInit = false; ResetError(); }