mate-desktop / engrampa

A file archiver for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
113 stars 52 forks source link

Problem unpacking archives with password #522

Closed Mejioy closed 3 months ago

Mejioy commented 3 months ago

Expected behaviour

Unpacking of archives without any problems

Actual behaviour

Errors: GLib-GIO-CRITICAL **: 09:49:40.743: g_file_new_for_path: assertion 'path != NULL' failed

GLib-GIO-CRITICAL **: 09:49:40.744: g_file_query_filesystem_info: assertion 'G_IS_FILE (file)' failed Segmentation fault (core dumped)

Steps to reproduce the behaviour

Create a .7z or .zip archive with a password image

Fill archive with some file and rerun engrampa.

Use this option: image

Enter the password: image

After this engrampa will crash with the following error: image

Note

If you choose a .7z archive and select this option: image

Unselecting this option will result in an error, that was mentioned above.

After creating the archive and filling it up, rerun engrampa and open this one archive. First, engrampa will request a password to open the archive. Extracting files from this type of archive does not result in an error.

MATE general version

1.28.0

Package version

1.28.1

Mejioy commented 3 months ago

Tried with an epub type archive, leads to the same problem. It seems the problem does not depend on the archive type.

Mejioy commented 3 months ago

The extraction of any archives using Caja-Engrampa does not result in an error. image

lukefromdc commented 3 months ago

This looks like another one of those problems exposed by the glib 2.78 and later changes.

Mejioy commented 3 months ago

I believe this is not the case, as the issue was observed with the glib version 2.65.3. Following your comment, I have tested the issue in the distribution using the glib 2.80 version, and the behavior remains unchanged.

lukefromdc commented 3 months ago

That means we need a different fix.Looking more closely at the error messages, it looks like a filepath is not being found. We have g_file_new_for_path not getting the path needed passed to it, thus it comes up NULL and engrampa crashes.

With the error coming on deselecting "encrypt the file list too" that suggests maybe when that isn't done, the encryption routine is being called on the file list anyway but with no or incomplete input

Mejioy commented 3 months ago

I have fixed the issue myself using a patch - https://github.com/mate-desktop/engrampa/commit/450f2ce034f9ded032f06a80c00f5c762918a7dd. Would you please verify the work and let me know if there are any issues? Alternatively, please let me know where I might have made a mistake.

lukefromdc commented 3 months ago

Fixed by https://github.com/mate-desktop/engrampa/pull/519 https://github.com/mate-desktop/engrampa/commit/4e0906a4dd0dfd0703ac688551bdcac5ff00a368