diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-06 13:54:39 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-07 09:28:08 +0100 |
commit | f6536f4db61b73cf7fd4a44bb5ba61eff61f8f91 (patch) | |
tree | 52a0aff314ec81f6c011c793574ad464f5816a25 /package | |
parent | 0f32809a86630d9e8bbf46fef23e189896c8a497 (diff) |
some cosmetic improvements, better warnings
Change-Id: I05a7eeb74088c278aab94519c7f53b0482e38058
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160400
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 2 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 59e5e94316a3..68bf5d1688a0 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -1113,7 +1113,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod } catch ( const uno::Exception& ex ) { - TOOLS_WARN_EXCEPTION( "package.xstor", "Can't write encryption related properties"); + TOOLS_WARN_EXCEPTION("package.xstor", "GetStream: decrypting stream failed"); SetEncryptionKeyProperty_Impl( xPropertySet, uno::Sequence< beans::NamedValue >() ); throw io::IOException(ex.Message); // TODO: } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 02282a03c4e5..d3c80cec2dce 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -947,6 +947,9 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream() } catch( const packages::WrongPasswordException& ) { + // note: due to SHA1 check this fallback is only done for + // * ODF 1.2 files written by OOo < 3.4beta / LO < 3.5 + // * ODF 1.1/OOoXML files written by any version if ( m_rZipPackage.GetStartKeyGenID() == xml::crypto::DigestID::SHA1 ) { SAL_WARN("package", "ZipPackageStream::getDataStream(): SHA1 mismatch, trying fallbacks..."); |