Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to extract 7z archive created with 7-Zip with long (129 characters or more) password #743

Closed
aaronweeden opened this issue Dec 28, 2020 · 6 comments

Comments

@aaronweeden
Copy link

Configuration

  • Keka version: 1.2.4 (4287)
  • macOS version: 10.13.6 (17G14042)

Describe the bug

Unable to extract a 7z archive that was compressed using the 7-Zip software with a password of 129 characters or more. It works fine with a password of 128 characters or fewer.

To Reproduce

Steps to reproduce the error (see the attached 7zip_test_129.log):

  1. Create a 7z archive using the 7-Zip software with a password of 129 characters or more, such as the attached 7zip_test_129.zip (change the extension to 7z) with the password RDT7t3M4SjjbmDOp1ZRrwIYp0RvxKuVKC8I9yMYFyGbQM6vQTyayIlYNfpseX5wCYRp2hyBQTjqqSch3QHsjjw9ZK5jCXueIOr1oAzmAcgJsPMxi9UtGwvlNrALIOZIun
  2. Open the file with Keka
  3. Enter the password
  4. The box shows "0 seconds," "1 seconds," and then refuses to extract the file.

Steps to reproduce working behavior (see the attached 7zip_test_128.log)

  1. Create a 7z archive using the 7-Zip software with a password of 128 characters or fewer, such as the attached 7zip_test_128.zip (change the extension to 7z) with the password 8nHkKgO9G4jUaxOOfs8nqTwvAIxXNDBOCEXSwZc25tl5RxD7CPmQdj9JaZsj7QlCV7xHJMq45peFeFDAabA5fLd6xhLoJWxT7VJy7Bv2kDr0Hk2Zj4L2bdTQEfRBOoMF
  2. Open the file with Keka
  3. Enter the password
  4. The box shows "0 seconds," "1 seconds," "about a minute," and then extracts the file.

Expected behavior

The behavior should be the same for passwords of any length. There should not be a cutoff at 128 characters.

Screenshots

N/A

Additional context

I do not have information about the version of Windows or 7-Zip that were used to create the example files.
I suspect the most important line in 7zip_test_129.log is "DEV: Dismissing delayed tasks"

@gingerbeardman
Copy link
Contributor

gingerbeardman commented Dec 29, 2020

I know there's a cut off at 128 because that's the limit for RAR (though some RAR clients do not adhere to the spec limit) see #656

...maybe the limit snuck into other methods?

@aonez
Copy link
Owner

aonez commented Dec 29, 2020 via email

@aonez
Copy link
Owner

aonez commented Dec 29, 2020

Just checked and the behaviour is exactly the same as #656 as @gingerbeardman stated.

@aonez aonez added the p7zip label Dec 29, 2020
@aonez aonez added this to the 1.2.7 milestone Dec 29, 2020
@aonez
Copy link
Owner

aonez commented Dec 29, 2020

The main reason here is using getpass() that has that 128 limit. Will use readpassphrase() instead.

Fixed in this build: Keka-v1.2.7-r4386.7z
Patch for p7zip: 17-tty-128+-pass-lenght.patch.zip

@aonez
Copy link
Owner

aonez commented Jan 10, 2021

1.2.7 released with this fixed. Thanks @aaronweeden and @gingerbeardman!

@aonez aonez closed this as completed Jan 10, 2021
@aonez
Copy link
Owner

aonez commented Jan 14, 2021

There's a possible segmentation fault with the new code when breaking while asking the password #754. Fixing in 1.2.8.

Fixed patch for p7zip: 17-tty-128+-pass-lenght.patch.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants