JDownloader Community - Appwork GmbH

Thread Tools Display Modes
Old 05.06.2021, 19:23
DrDentz DrDentz is offline
Modem User
Join Date: Jun 2021
Posts: 1
Default Zip extraction fails when checking multiple passwords

When I configure a list of extraction passwords for a zip file, only the first one gets checked because the check returns an exception. This seems to happen because

1. Zip4J returns an exception when the AES password check fails:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

2. These exceptions are not catched in the checkPassword call in the extractor:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

3. The first catch is at the end of the function:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
so as a result the passwordList loop is not continued and the function ends.

Here is the relevant log part:
--ID:1258TS:1622903694431-6/5/21, 4:34:54 PM -  [org.jdownloader.extensions.extraction.ExtractionController(run)] -> Archive is Protected - Sat Jun 05 16:34:54 CEST 2021
--ID:1258TS:1622903694432-6/5/21, 4:34:54 PM -  [org.jdownloader.extensions.extraction.ExtractionController(run)] -> Try to find password
--ID:1258TS:1622903694432-6/5/21, 4:34:54 PM -  [org.jdownloader.extensions.extraction.ExtractionController(run)] -> Start password finding for Archive:<ARCHIVE> - Sat Jun 05 16:34:54 CEST 2021
--ID:1258TS:1622903694432-6/5/21, 4:34:54 PM -  [org.jdownloader.extensions.extraction.ExtractionController(checkPassword)] -> Check Password: '<PASSWORD>'
--ID:1258TS:1622903694439-6/5/21, 4:34:54 PM -  [org.jdownloader.extensions.extraction.multi.Zip4J(findPassword)] -> Validating password: <ARCHIVE>/<FILE>|<PASSWORD>
--ID:1258TS:1622903694456-6/5/21, 4:34:54 PM -  [] -> Exception thrown at org.jdownloader.extensions.extraction.ExtractionController.run(ExtractionController.java:492):
org.jdownloader.extensions.extraction.ExtractionException: Wrong Password for file: <ARCHIVE>/<FILE>
        at org.jdownloader.extensions.extraction.multi.Zip4J.findPassword(Zip4J.java:132)
        at org.jdownloader.extensions.extraction.ExtractionController.checkPassword(ExtractionController.java:228)
        at org.jdownloader.extensions.extraction.ExtractionController.run(ExtractionController.java:318)
        at org.jdownloader.extensions.extraction.ExtractionController.run(ExtractionController.java:61)
        at org.appwork.utils.event.queue.QueueAction.start(QueueAction.java:202)
        at org.appwork.utils.event.queue.Queue.startItem(Queue.java:504)
        at org.appwork.utils.event.queue.Queue.runQueue(Queue.java:437)
        at org.appwork.utils.event.queue.QueueThread.run(QueueThread.java:64)
Caused by: net.lingala.zip4j.exception.ZipException: Wrong Password for file: <ARCHIVE>/<FILE>
        at net.lingala.zip4j.crypto.AESDecrypter.init(AESDecrypter.java:121)
        at net.lingala.zip4j.crypto.AESDecrypter.<init>(AESDecrypter.java:65)
        at net.lingala.zip4j.unzip.UnzipEngine.initDecrypter(UnzipEngine.java:202)
        at net.lingala.zip4j.unzip.UnzipEngine.init(UnzipEngine.java:185)
        at net.lingala.zip4j.unzip.UnzipEngine.getInputStream(UnzipEngine.java:118)
        at net.lingala.zip4j.unzip.Unzip.getInputStream(Unzip.java:183)
        at net.lingala.zip4j.core.ZipFile.getInputStream(ZipFile.java:990)
        at org.jdownloader.extensions.extraction.multi.Zip4J.findPassword(Zip4J.java:90)
        ... 7 more

--ID:1258TS:1622903694456-6/5/21, 4:34:54 PM -  [org.jdownloader.extensions.extraction.ExtractionListenerList(onExtractionEvent)] -> Extraction failed
--ID:1258TS:1622903694484-6/5/21, 4:34:54 PM -  [org.jdownloader.extensions.extraction.ExtractionListenerList(onExtractionEvent)] -> Cleanup

Last edited by DrDentz; 05.06.2021 at 19:30. Reason: External URLs not visible
Reply With Quote
Old 07.06.2021, 14:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
Join Date: Mar 2009
Location: Germany
Posts: 79,044

fixed with next core update. issue was in org.jdownloader.extensions.extraction.multi.Zip4J in findPassword method

I thought ZipException extends IOException and thus the exception was never caught as intended
JD-Dev & Server-Admin

Last edited by Jiaz; 07.06.2021 at 14:43.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 13:14.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.