aonez / Keka

The macOS & iOS file archiver
https://www.keka.io
4.7k stars 236 forks source link

[BUG] Error code 2 using "7zz" - Fatal error #1443

Closed Inkoming closed 2 months ago

Inkoming commented 4 months ago

Configuration

Describe the bug

Trying to compress little files with ZIP output using password (256 zip). The password length is base64 148 characters using this format: Word---Word---Word (till 148 characters).

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Keka' and set zip output (tick "Use AES 256 encryption) + Slow compression.
  2. Tick "Exclude Mac resource forks".
  3. Tick "Verify compression integrity".
  4. Use long password (148 characters, or even 49 characters...).
  5. Drag & drop the folder (7 small items) on Keka.
  6. Error.

Expected behavior

Keka should compress.

Screenshots

None.

Additional context

Changing the source folder doesn't change anything. It looks like the problem is the password length. Do we have a maximum password length? Please specify if it's the case.

Keka.log

Inkoming commented 4 months ago

Tested with 7zip output, same long password, no problems.

aonez commented 4 months ago

@Inkoming just to be sure, what version of 7zip are you using? You mean 7-Zip on Windows? Or is it p7zip on the terminal?

Inkoming commented 4 months ago

@aonez I'm on macOS, so only using Keka to compress to 7zip (no 7zip specific App).

aonez commented 4 months ago

Tested with 7zip output, same long password, no problems.

But this test you mentioned here with no problems, was it on macOS on the Terminal?

Both 7zz and p7zip fail on my end with 100 characters password, only for ZIP format. So probably it is limited to 99 characters. Also only affects when AES256 is enabled.

Inkoming commented 4 months ago

The test with 7zip output (148 characters password) was through Keka on macOS, no Terminal.

aonez commented 4 months ago

Ah ok you meant the 7Z format, got it. Seems like there's this 100 characters limit for ZIP + AES.

Can you double check if it fails with lower character password on your end? You mentioned 49 characters but I'm unable to reproduce the issue with less than 100 characters.

Inkoming commented 4 months ago

Tested right now, 99 characters ZIP 256 AES is working, above, not. My bad. So it's upon zip's side problem right? Maybe we need a warning on Keka to not exceed 99 characters?

aonez commented 4 months ago

Indeed. Just checked and WinZIP is limited to 99 characters, even for non AES256 passwords. So non AES compressed with 100+ characters can't be extracted using WinZIP.

warning on Keka to not exceed 99 characters

That will be it. Thanks a lot for all the feedback @Inkoming.

aonez commented 2 months ago

This was released with 1.4.0. Thanks again @Inkoming!