resolves tdf#149567: odfvalidator: do not validate password protected files
Running "java -jar odfvalidator-0.9.0-jar-with-dependencies.jar test.odt" it fails with ene 30, 2026 1:09:49 P. M. org.odftoolkit.odfdom.pkg.ZipHelper entriesToMap INFORMACIÓN: ZIP ENTRY not found /home/xisco/Descargas/test.odt: Fatal: ZIP entry 'mimetype': only DEFLATED entries can have EXT descriptor /home/xisco/Descargas/test.odt: Fatal: The document is encrypted. Validation of encrypted documents is not supported. /home/xisco/Descargas/test.odt/META-INF/manifest.xml[2,194]: Error: unexpected attribute "manifest:version" /home/xisco/Descargas/test.odt/META-INF/manifest.xml[6,136]: Error: tag name "manifest:start-key-generation" is not allowed. Possible tag names are: <key-derivation> Change-Id: I185e9cd5227a07cd7fd07379c8925b9a8296d0a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198426 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
@@ -263,7 +263,7 @@ void test::BootstrapFixture::validate(const OUString& rPath, std::u16string_view
|
||||
}
|
||||
else if( eFormat == test::ODF && !aContentOUString.isEmpty() )
|
||||
{
|
||||
if( aContentOUString.indexOf("Error") != -1 )
|
||||
if( aContentOUString.indexOf("Error") != -1 || aContentOUString.indexOf("Fatal") != -1 )
|
||||
{
|
||||
SAL_WARN("test", aContentOUString);
|
||||
CPPUNIT_FAIL(aContentString.getStr());
|
||||
|
||||
@@ -173,10 +173,10 @@ void UnoApiTest::save(TestFilter eFilter, const char* pPassword)
|
||||
{ u"OOXPassword"_ustr, uno::Any(sPassword) }
|
||||
};
|
||||
aMediaDescriptor[utl::MediaDescriptor::PROP_ENCRYPTIONDATA] <<= aEncryptionData;
|
||||
|
||||
// validation fails with "zip END header not found"
|
||||
skipValidation();
|
||||
}
|
||||
|
||||
// Password protected documents can't be validated
|
||||
skipValidation();
|
||||
}
|
||||
|
||||
saveWithParams(aMediaDescriptor.getAsConstPropertyValueList());
|
||||
|
||||
Reference in New Issue
Block a user