Bug 358675 - Ark cannot open encrypted 7z archives with p7zip 15.09
Summary: Ark cannot open encrypted 7z archives with p7zip 15.09
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 15.12.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL: https://bugs.archlinux.org/task/47923
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-28 10:36 UTC by fademind
Modified: 2016-03-07 22:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 15.12.3


Attachments
sample 7z file (240.93 KB, application/x-7z-compressed)
2016-01-28 11:21 UTC, fademind
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fademind 2016-01-28 10:36:07 UTC
ark 15.12.1-1
KDE Frameworks 5.18.0
Plasma 5.5.4-1

Reproducible: Always

Steps to Reproduce:
1. Create password protection 7z with encrypted files names.
2. Open this 7z file in ark.


Actual Results:  
Ark window freeze without any debug information.

$ gdb ark
GNU gdb (GDB) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ark...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/ark 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe655a700 (LWP 21363)]
KSambaShare: Could not find smb.conf!
[New Thread 0x7fffd9532700 (LWP 21394)]
[Thread 0x7fffd9532700 (LWP 21394) exited]
[Thread 0x7fffe655a700 (LWP 21363) exited]
[Inferior 1 (process 21359) exited normally]
(gdb) bt
No stack.
(gdb) 


Expected Results:  
Prompt window for enter password to archive.

Screenshot: https://i.imgur.com/Rztq6v2.png
Comment 1 Elvis Angelaccio 2016-01-28 11:20:05 UTC
Works for me. Can you upload that archive here? Or at least start Ark from terminal and post its output? (make sure debug is enabled, from kdebugsettings app).
Comment 2 fademind 2016-01-28 11:21:29 UTC
Created attachment 96881 [details]
sample 7z file

pass: test
Comment 3 fademind 2016-01-28 11:23:40 UTC
[tomasz@arch ~]$ export LANG=C
[tomasz@arch ~]$ gdb ark
GNU gdb (GDB) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ark...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/ark 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe655a700 (LWP 29294)]
KSambaShare: Could not find smb.conf!
[New Thread 0x7fffd9532700 (LWP 29329)]
[Thread 0x7fffd9532700 (LWP 29329) exited]
[Thread 0x7fffe655a700 (LWP 29294) exited]
[Inferior 1 (process 29288) exited normally]
(gdb) bt
No stack.
(gdb)
Comment 4 fademind 2016-01-28 11:30:02 UTC
This file opened with PeaZip GTK2:
http://i.imgur.com/xUsZYQD.png
and
http://i.imgur.com/WvIQNoD.png
Comment 5 Elvis Angelaccio 2016-01-28 11:32:22 UTC
(In reply to fademind from comment #2)
> Created attachment 96881 [details]
> sample 7z file
> 
> pass: test

Thanks. I can open it as expected.
So, does it happen with any encrypted archive you create? Or only with this one?

Please post the output of:

$ ark Getting Started.7z
(make sure to enable verbose debug output from kdebugsettings)

and also the output of:

$ 7z | head -3
Comment 6 fademind 2016-01-28 11:49:35 UTC
[tomasz@arch ~]$ 7z | head -3

7-Zip [64] 15.09 beta : Copyright (c) 1999-2015 Igor Pavlov : 2015-10-16
p7zip Version 15.09 beta (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz (306A9),ASM,AES-NI)
[tomasz@arch ~]$ 

[tomasz@arch ~]$ export LANG=C
[tomasz@arch ~]$ gdb ark
GNU gdb (GDB) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ark...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/ark 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe655a700 (LWP 2368)]
KSambaShare: Could not find smb.conf!
[New Thread 0x7fffd9532700 (LWP 2482)]
[Thread 0x7fffd9532700 (LWP 2482) exited]
[Thread 0x7fffe655a700 (LWP 2368) exited]
[Inferior 1 (process 2362) exited normally]
(gdb) 


I don't have any extra debug info. 

NOTE: This bug affected all 7z archives with enabled option "encrypted files names". 
7z archives with standard pass protect (WITHOUT encrypted files names) are openable via Ark:

http://i.imgur.com/xBqgMeg.png
Comment 7 Elvis Angelaccio 2016-01-28 12:29:25 UTC
(In reply to fademind from comment #6)
> [tomasz@arch ~]$ 7z | head -3
> 
> 7-Zip [64] 15.09 beta : Copyright (c) 1999-2015 Igor Pavlov : 2015-10-16
> p7zip Version 15.09 beta (locale=C,Utf16=off,HugeFiles=on,64 bits,8 CPUs

This might explain it. I have the lastest p7zip from Arch repositories (v9.38.1).
How did you install it? From sources?

> [tomasz@arch ~]$ export LANG=C
> [tomasz@arch ~]$ gdb ark

No need to use gdb. Just start Ark from terminal and try to open the file. If you don't see any useful output, you will have to enable it from KDebugSettings (which you may need to install first).
Comment 8 fademind 2016-01-28 12:50:09 UTC
Yep, this issue occur due p7zip 15.09 changes.
Arch developers do not update p7zip to latest version, but I just updated package based on PKGBUILD from ABS. See: 
https://github.com/FadeMind/archpkgbuilds/blob/master/AUR/customized/p7zip/PKGBUILD

I have enabled all debug kde:
http://i.imgur.com/r7LzDr3.png

but for Ark working fine except loading KDialog prompt against password for Encrypted 7z archive. Sadly I don't have any usefull information.

After downgrade to old 9.38.1-4 from Arch repos, prompt password for encrypted file shown:
http://i.imgur.com/gTxD4SI.png

So:

Issue happened ONLY IF p7zip 15.09 is installed and occur "encrypted names" 7z archives.
Comment 9 Elvis Angelaccio 2016-01-28 13:24:09 UTC
I can confirm, indeed is an issue with p7zip 15.09. Thanks for reporting.
Comment 10 Ragnar Thomsen 2016-03-07 22:00:04 UTC
Git commit 26cf274c5bae04b90f526005a2514b16564c6df3 by Ragnar Thomsen.
Committed on 07/03/2016 at 21:57.
Pushed by rthomsen into branch 'Applications/15.12'.

cli7z: Fix detection of password prompt for p7zip 15.09

A space was removed which broke detection of the password prompt.
FIXED-IN: 15.12.3

M  +1    -1    plugins/cli7zplugin/cliplugin.cpp

http://commits.kde.org/ark/26cf274c5bae04b90f526005a2514b16564c6df3