[Libreoffice-commits] core.git: package/source

Thorsten Behrens Thorsten.Behrens at CIB.de
Sun Aug 20 03:04:08 UTC 2017


 package/source/zippackage/ZipPackage.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 7a82caa8f7874f44f32c633140b015325454e570
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Sun Aug 20 03:18:09 2017 +0200

    package: get rid of requirement for plain passwords
    
    Change-Id: I36d41d9166ae2b2ea287af82c87b5f2ea86bd564
    Reviewed-on: https://gerrit.libreoffice.org/41344
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 33ed9c1bc023..d91c0785304c 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1672,9 +1672,8 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
         // this property is only necessary to support raw passwords in storage API;
         // because of this support the storage has to operate with more than one key dependent on storage generation algorithm;
         // when this support is removed, the storage will get only one key from outside
-        // TODO/LATER: Get rid of this property as well as of support of raw passwords in storages
         uno::Sequence< beans::NamedValue > aKeys;
-        if ( !( aValue >>= aKeys ) || ( aKeys.getLength() && aKeys.getLength() < 2 ) )
+        if ( !( aValue >>= aKeys ) || ( aKeys.getLength() && aKeys.getLength() < 1 ) )
             throw IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 2 );
 
         if ( aKeys.getLength() )
@@ -1689,7 +1688,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
                     bHasSHA1 = true;
             }
 
-            if ( !bHasSHA256 || !bHasSHA1 )
+            if ( !bHasSHA256 && !bHasSHA1 )
                 throw IllegalArgumentException(THROW_WHERE "Expected keys are not provided!", uno::Reference< uno::XInterface >(), 2 );
         }
 


More information about the Libreoffice-commits mailing list