Bug 35371 - Ark cannot extract password-protected archives
Summary: Ark cannot extract password-protected archives
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 2.1.9
Platform: Mandrake RPMs Linux
: VHI normal
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords:
: 65218 69188 109341 146482 198685 206884 242676 249651 250538 266387 269665 272119 277715 280176 (view as bug list)
Depends on: 189825 206884
Blocks: 469417
  Show dependency treegraph
 
Reported: 2001-11-26 16:03 UTC by markushabig
Modified: 2023-05-06 16:33 UTC (History)
42 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6.4
Sentry Crash Report:


Attachments
Extract password protected .rar and .zip files. (17.69 KB, patch)
2005-05-17 23:58 UTC, Fredrik Edemar
Details
ark handles passwords (22.48 KB, image/png)
2011-01-23 15:40 UTC, jasmintee
Details
New crash information added by DrKonqi (5.74 KB, text/plain)
2011-05-21 15:36 UTC, Ettore Atalan
Details
encrypted test.7z archive (password: test) (198 bytes, application/x-7z-compressed)
2011-05-21 15:38 UTC, Ettore Atalan
Details
New crash information added by DrKonqi (67.06 KB, text/plain)
2013-07-18 15:35 UTC, pierre
Details
Zipped jpg. Password : 123 (169.62 KB, application/zip)
2014-11-11 10:11 UTC, jeremy9856
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markushabig 2001-11-26 15:54:13 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           ark
Version:           v.2.1.9 (using KDE 2.2.1 )
Severity:          wishlist
Installed from:    Mandrake Linux Vitamin
Compiler:          gcc version 2.96 20000731 (Mandrake Linux 8.1 2.96-0.62mdk)
OS:                Linux (i586) release 2.4.8-26mdk
OS/Compiler notes: 

Hi last time i tried to extract a password-protected zipfile.(zipped with "zip -e xy.ziy xy")
I found out that ark can't extract password-protected zipfiles. Not in konuqeror embeded ark and not in the
real program "ark". It would be a nice feature for further KDE Versions.

Greetings (from Germany)





Markus Habig

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Jorge Adriano 2003-09-26 00:15:50 UTC
My sister just had problems with it too. 
And damn this bug report is from 2001 and not even confirmed yet! 
 
J.A. 
 
Comment 2 Henrique Pinto 2003-10-27 15:31:47 UTC
> And damn this bug report is from 2001 and not even confirmed yet!

It is confirmed now.

I'll take a look at this issue soon.
Comment 3 Henrique Pinto 2003-11-09 02:32:06 UTC
*** Bug 65218 has been marked as a duplicate of this bug. ***
Comment 4 Henrique Pinto 2003-11-28 22:38:16 UTC
*** Bug 69188 has been marked as a duplicate of this bug. ***
Comment 5 Michał Kosmulski 2004-03-09 16:47:54 UTC
I'm not sure if it should be considered a separate bug: if I drag a file from a password-protected zip archive onto my desktop, I don't get an error, but instead, a file of length zero with the corresponding name is created. This is quite misleading to say least - if ark can't handle the extraction, I should get an error. And best, it should support password-protected archives.
Comment 6 walterh 2004-05-10 21:14:42 UTC
I was asked to reproduce this.
ark still opens password protected files as zero-length files.
Comment 7 Jorge Adriano 2004-08-22 02:00:41 UTC
KDE 3.3 - Still doesn't ask for password.
Comment 8 Timur 2004-12-31 09:04:34 UTC
It is a very annoying problem to me too... 
Ark is not able to create password protected files AND is not able to open the one that are created from other programs. 

I know that zip files password protextion is weak but still is very used in M$ world (and therefore it is important to be able to deal with it) 

It is confirmed also with KDE 3.3.2 on Suse 9.1.

An easy/quick solution could be to allow ArK to shell to zipcloak program which support crypt/decript protection with password.

Please fix this

regards,
Timur
Comment 9 Gerold Strobel 2005-05-08 15:06:51 UTC
That one still sucks in KDE 3.4.
Please get it fixed.
Comment 10 Giuseppe Torelli 2005-05-10 12:58:09 UTC
There is KArchiver who handles zip archives with password. Maybe the developer of Ark can give a look to its source.
Comment 11 Janet 2005-05-16 17:29:03 UTC
It's not only the zip archives but also the rar archives. It would be great if ark could create and open password protected rar archives. 
Comment 12 Per (phobie) 2005-05-16 23:53:45 UTC
------- Additional Comment #2 From Henrique Pinto 2003-10-27 15:31 -------
>> And damn this bug report is from 2001 and not even confirmed yet!
>I'll take a look at this issue soon. 

When exactly is "soon"?
Comment 13 Fredrik Edemar 2005-05-17 23:58:05 UTC
Created attachment 11074 [details]
Extract password protected .rar and .zip files.

This patch makes it possible to extract .zip and .rar files with password
protection. TODO: Ability to create password protected archives, support for
more file formats and better error messages.
Comment 14 m.wege 2005-05-18 00:07:13 UTC
Great! I am already really looking forward to KDE 3.5 which with this and all the other improvements which are on the way should be really another step forward. Will the TODO be also made so that it will be into 3.5?
Comment 15 markushabig 2005-05-18 15:50:40 UTC
Thanks a lot!

Markus Habig
Comment 16 Nikolai Försterling 2005-06-22 16:30:07 UTC
to extract protected archives, simply open a terminal emu in konqueror and type:
unrar e <file>
simple and quick!
no need to search for graphical solution though i formerly missed this feature too (comfortable like winrar)
Comment 17 Thibaut Cousin 2005-06-22 16:39:22 UTC
That solution is obvious but, I think, not relevant here. Don't forget we're in a bugreport for a *graphical* application. Many end-user don't even know what a terminal is and they shouldn't need it for simple operations like that, even if it's quicker to use than a GUI.
Comment 18 Jose 2005-07-16 16:25:34 UTC
Will the patch submitted be in the official 3.5 version?
What the hell is happening here? This bug is four years old. A major version of KDE has passed and a lot of minor versions too and ark it's still the same as it was on kde2! Except for the crystal icons, ark has not evolved. Look at kpdf, konqueror, and many many more applications. They all have improved a lot and ark it's still hooked in 2001. Today, file-roller is the only real tool for Linux supporting passwords for certain kind of files.
Comment 19 Thiago Macieira 2005-07-16 16:52:35 UTC
Fredrik: I've taken a look over your patch and it looks ok.

Would you be willing to maintain and improve the code if I commit it to Subversion?
Comment 20 Fredrik Edemar 2005-07-17 13:33:01 UTC
Thiago: Yes, that would be kind of you. I'v already improved my patch a bit (support for archives where some, not all, files are password protected), but I'm on vacation right now so I don't have access to my Linux machine. I'll back in the beginning of August and then I'll work on it more. As the feature freeze for KDE 3.5 is soon, I doubt however I will manage to be ready with the password protected archives creation support in time.
Comment 21 Thiago Macieira 2005-07-17 15:05:06 UTC
We don't have a set date for the feature freeze, so I'm hoping we can get all the features in. I'm committing the patch as it is now and we'll let people test it. When you have access to your development machine, we'll see about the new features.
Comment 22 Georg Robbers 2005-07-19 20:01:37 UTC
*** Bug 109341 has been marked as a duplicate of this bug. ***
Comment 23 Fredrik Edemar 2005-08-07 15:26:47 UTC
SVN commit 443809 by fedemar:

* Support for extracting password protected rar and zip archives.
* Add a cancel button to the progress dialog.
* Close the progress dialog if the compress program couldn't be found.
* Close the progress dialog if the user aborted the file-already-exists warning message during the extraction.

CCBUG: 35371
BUG: 108641
CCBUG: 86854
BUG: 106711
BUG: 103653


 M  +13 -13    ar.cpp  
 M  +1 -2      ar.h  
 M  +48 -16    arch.cpp  
 M  +15 -5     arch.h  
 M  +0 -1      ark_part.h  
 M  +12 -7     arkwidget.cpp  
 M  +2 -2      arkwidget.h  
 M  +6 -7      compressedfile.cpp  
 M  +1 -2      compressedfile.h  
 M  +9 -10     lha.cpp  
 M  +1 -2      lha.h  
 M  +6 -2      mainwindow.cpp  
 M  +17 -10    rar.cpp  
 M  +2 -2      rar.h  
 M  +9 -10     sevenzip.cpp  
 M  +1 -2      sevenzip.h  
 M  +12 -13    tar.cpp  
 M  +1 -2      tar.h  
 M  +25 -12    zip.cpp  
 M  +2 -3      zip.h  
 M  +9 -10     zoo.cpp  
 M  +1 -2      zoo.h  
Comment 24 Henrique Pinto 2005-08-20 20:07:27 UTC
*** Bug has been marked as fixed ***.
Comment 25 mick black 2006-02-28 20:37:53 UTC
I just tried using it again and still cannot get ark to recognize given password...I was at chocoreve.blogspot and the posted_first_at_chocoreve password causes ark to crash...did I miss out on some added install now needed? I'm using ark 2.6.1 on the latest kde kernel (3.5.1), 2.6.15-1 power-pc...
Comment 26 shakhnov 2006-04-08 10:37:46 UTC
I have at the same problems with ark. Just can open archives that was built with password. Now I use rar - it is work very good. rar e (name of archiv)
Comment 27 Christiaan Hees 2006-04-14 23:12:24 UTC
When I tried to extract a .rar file with ark 2.6.1 it asked for the password like it should, but then after working for a while it said the password was wrong and asked it again. `unrar x <file>` worked fine though, so the password was correct. So the bug doesn't appear to be properly fixed yet.
Comment 28 Haris Kouzinopoulos 2006-04-14 23:43:33 UTC
Can you please try with ark 2.6.2 ? This bug was fixed there
Comment 29 Niklas Spille 2006-12-16 01:30:31 UTC
It seems to me like this is still not fixed completely, at least not for RAR archives (excuse my winspeak):

There are two kinds of password-protected RAR archives, some require the password to be able to extract files (this works);

the other kind requires the password to be able to view the archive's contents in ark - and if you happen to stumble upon such an archive, ark will quit saying "Error while opening the archive".

The unrar e-workaround posted above works for both kinds of archives...
Comment 30 Dragan Espenschied 2007-10-13 08:59:14 UTC
I just wanted to say how happy i am to find out today that password protected zip archives are now supported in ark! Thanks people!
Comment 31 Jakub Stachowski 2008-05-30 19:17:38 UTC
Ark from trunk (4.1) lost a lot of functionality. Password support is one of unfortunate victims.
Comment 32 Jakub Stachowski 2008-06-10 16:02:09 UTC
*** Bug 146482 has been marked as a duplicate of this bug. ***
Comment 33 Harald Hvaal 2008-08-09 08:30:44 UTC
Early support for passwords with rar-files is now available in Ark trunk. As for zip files, libzip which ark currently uses, does not support this, so as of now it cannot be done. I have been looking at some solutions; either import the archive code of infozip, or revive a command-line-based solution, as a fallback for password protected archives.
Comment 34 FiNeX 2008-12-26 16:07:22 UTC
Using r901634 and rar 3.80, ark manage correctly rar protected files. If I try to extract files from a zip encrypted file, it extract zero-lenght files (but it should have been already reported).
Comment 35 Harald Hvaal 2008-12-26 17:39:46 UTC
@Finex: as mentioned in the comment just above, libzip, and therefore also ark, has no zip password support as of now.
Comment 36 FiNeX 2008-12-26 18:28:34 UTC
Indeed, I've simply empirically confirmed it  :-)
Comment 37 Raphael Kubo da Costa 2009-07-02 20:32:47 UTC
*** Bug 198685 has been marked as a duplicate of this bug. ***
Comment 38 Matteo 2009-07-24 11:27:51 UTC
Ark now can't manage password protected archive!
Will this feature implemented soon?
Comment 39 Victor Yang 2009-08-30 03:14:44 UTC
at one point, when I was running KDE 3.5, ark would prompt me for a password -- I don't recall what version of ark, unfortunately. As I started to click and drag the files to be decompressed from a zip file in ark, I'd get a password prompt. After typing in the password, I'd get a cursor with the drag icon on it.  Then I'd just drop the files in a konqueror window opened to the desired destination.

Now I'm running KDE 4.2.2 and ark 2.12 which does not prompt me for a password.  Instead, it appears to unzip the file, but the resulting file is 0k in size.
Comment 40 Dmitry 2010-01-18 17:53:42 UTC
(Sorry for my bad English)

I cannot open password protected rar-archive.
Comment 41 kioftes 2010-01-29 21:12:37 UTC
still going on KDE 4.3.5 Ark version 2.13.....i cannot open any rared, password protected file that has come into my hands using ark....
Comment 42 Luke 2010-04-13 03:35:51 UTC
year 2010, kde 4.4.2, archlinux 2.6.33, ark 2.14, qt 4.6.2, unrar 3.93 and it still does NOT WORK!!
Comment 43 Thiago Macieira 2010-04-13 08:33:30 UTC
The bug is still open. If it were meant to work, the bug would be closed.
Comment 44 Raphael Kubo da Costa 2010-06-25 16:37:10 UTC
*** Bug 206884 has been marked as a duplicate of this bug. ***
Comment 45 Raphael Kubo da Costa 2010-06-25 16:37:32 UTC
*** Bug 242676 has been marked as a duplicate of this bug. ***
Comment 46 Florian Hubold 2010-06-25 17:03:26 UTC
Maybe you could take a look in file-roller 2.14.1 changelog (way back from 04/2006) as the changelog mentions "ask for a password when opening password-protected rar/arj archives" so maybe this could be a starting point how they check the archives how it is password-protected.

And it is needed to distinguish between two cases:

1. extracting a password protected file within an archive (this should work)
2. extracting a password-protected archive (this doesn't work with Ark)
Comment 47 Aaron Lewis 2010-07-02 07:28:03 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear KDE Developers:

	Sorry for the noise !

On 06/25/2010 11:03 PM, Florian Hubold wrote:
> https://bugs.kde.org/show_bug.cgi?id=35371
> 
> 
> Florian Hubold <doktor5000@arcor.de> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |doktor5000@arcor.de
> 
> 
> 
> 
> --- Comment #46 from Florian Hubold <doktor5000 arcor de>  2010-06-25 17:03:26 ---
> Maybe you could take a look in file-roller 2.14.1 changelog (way back from
> 04/2006) as the changelog mentions "ask for a password when opening
> password-protected rar/arj archives" so maybe this could be a starting point
> how they check the archives how it is password-protected.
> 
> And it is needed to distinguish between two cases:
> 
> 1. extracting a password protected file within an archive (this should work)
> 2. extracting a password-protected archive (this doesn't work with Ark)
> 


- -- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwteNEACgkQvf41sEptMqD5twCfY7yOUErboYwdyxbHQkBTbF9o
+zwAnRm1CMsXmrXvQOlYZK4YrD9n/No9
=AHKb
-----END PGP SIGNATURE-----
Comment 48 niburu1 2010-07-04 20:35:32 UTC
Still observing this bug in KDE 4.4.5 with password protected rar files. Unpacking them works by navigating to the folder and typing "unrar e <filename>".
Comment 49 Florian Hubold 2010-07-05 10:11:40 UTC
I have uninstalled Ark and i have put up a servicemenu-file for file-roller,
now it works as expected, i.e. rightclick on rar archive -> extract here and when needed it asks for a password. It's not a solution but at least it's working:


$ cat /usr/share/kde4/services/ServiceMenus/fileroller_servicemenu.desktop

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/x-gzip;application/x-tar;application/x-compressed-tar;application/x-bzip-compressed-tar;application/zip;application/x-bzip;application/x-rar;application/x-tarz;application/x-bzip2;application/x-java-archive;application/x-deb;application/x-7z-compressed;application/x-compress;application/x-zip-compressed;application/x-lzma;application/x-servicepack;application/x-xz-compressed-tar;application/x-lzma-compressed-tar;
Actions=filerollerExtractHere;
X-KDE-Priority=TopLevel
X-KDE-StartupNotify=false

[Desktop Action filerollerExtractHere]
Name=Extract Archive Here
Name[de]=Archiv hierher entpacken
Icon=utilities-file-archiver
Exec=file-roller --extract-here %F
Comment 50 Romain Henriet 2010-08-14 20:08:19 UTC
Still not working in KDE 4.5.0 :(
Comment 51 Vamp898 2010-09-01 16:51:31 UTC
Damm this Bug is existing since KDE 2.2.1 and still not fixed in 4.5.1
Comment 52 aphidia 2010-09-03 22:29:31 UTC
HAHA, I just noticed this bug today and it's been 10 years!!
Comment 53 Raphael Kubo da Costa 2010-09-04 21:57:59 UTC
*** Bug 249651 has been marked as a duplicate of this bug. ***
Comment 54 Raphael Kubo da Costa 2010-09-08 14:32:17 UTC
*** Bug 250538 has been marked as a duplicate of this bug. ***
Comment 55 Luke 2010-09-13 19:56:17 UTC
Hi, I've just e-mailed ark developer, this should clear things up to you


------------------------------------------------------------------

Hi,

I've removed some people from the CC list who haven't worked on Ark
for quite a few years.

I can see that it's a pretty annoying bug, but it all boils down to
the fact that both Harald and I only maintain Ark when we have some
free time, which can be quite short when one's got university, real
work and real life to take care of ;)

There are some other nasty bugs which also suck (such as not being
able to close Ark while an archive is still being loaded without
crashing it) that we need to fix.

Anyway, thanks for contacting us instead of just going around and
saying "blah blah blah Ark and KDE suck blah blah blah", it is nice to
know people are using Ark :) As soon as we find some time, rest
assured the bug will be fixed.

Cheers,
Raphael
Comment 56 Aaron Lewis 2010-09-14 02:43:25 UTC
Hmm , it's really easy to test if an RAR archive is protected or not.

unrar t -p- file.rar

And if it didn't exit in normal status , thus archive with be either password protected or corrupted.

Anyway , i'd look deep into it when i'm being free.
Comment 57 jasmintee 2010-11-22 11:32:02 UTC
Well, it might be easy if you know the command line. You do not need ark then anyway. But I want to install Linux+KDE on a friends laptop, because he doesn't own a valid windows license. If he ever recieves a password-protected file, he will not be possible to open it, because he really doesn't have any idea of the command line. So please, consider newb use-cases. In my eyes, KDE is very easy to understand WITHOUT having knowledge about how computers work, so it's very newb-friendly. But details like this (can) turn KDE from user-friendly to unfriendly.

Regards, drm
Comment 58 Kai Uwe Broulik 2010-11-22 12:49:37 UTC
Well I still plead on Ark being laid up altogether and a powerful KIO slave created which can create archives and handle them. In 2010 there should not be a distinction between real folders and archives.
But yes, also in 2010 nobody should need to use the console anymore, at least not for such simple tasks.
Comment 59 Raphael Kubo da Costa 2010-12-08 02:14:05 UTC
Changing the default assignee for currently open Ark bug reports to me.
Comment 60 Norbert Lederbauer 2011-01-03 18:36:12 UTC
Its the same for me.
First we waited for a version that could open achieves protected by a password, then we got one, now nothing works no more and you have to extract by terminal. I do not need a program that refers me to an other.
Greetings 
N.L
Comment 61 Dotan Cohen 2011-01-18 13:32:38 UTC
I can confirm that in KDE 4.5.5 that Ark does not open password-protected rar files. When the user clicks on a password-protected rar file a new Taskbar entry appears with the spinning throbber, but after some time that Taskbar entry disappears and nothing else happens. No open rar, no password prompt, no dialogue, no message to the user.
Comment 62 jasmintee 2011-01-23 15:40:44 UTC
Created attachment 56350 [details]
ark handles passwords

ark password dialog box
Comment 63 Aaron Lewis 2011-01-23 15:44:15 UTC
It's corrent only on some specific type of files.

If an RAR archive is encrypted totally ( -hp ) , Ark would fail , but
other apps like FIle-Roller is un-affected.

try:
	rar a -hp test.rar test && ark test.rar

Ark will hang eternally.

Besides , unrar is opensource and avilable on rarlab.com , developers
could fetch and learn how to work it out if they have time and willing
to do it.

- Aaron
Comment 64 Raphael Kubo da Costa 2011-01-23 15:48:01 UTC
For password support to work on zip and rar files again, the first step would probably be to reenable support for KPtyProcess on non-Windows platforms in kerfuffle/cliinterface.cpp -- this would still mean there's no way to input passwords on Windows, though.
Comment 65 Aaron Lewis 2011-01-23 15:51:54 UTC
Seems it's bit different in trunk now , i just did a upgrade and Ark automatically consider header-encrypted RAR as failure during extraction.
Comment 66 jasmintee 2011-01-23 15:53:45 UTC
(In reply to comment #62)
> Created an attachment (id=56350) [details]
> ark handles passwords
> 
> ark password dialog box

Sorry, somehow I forgot to add some text.

This screenshot was taken on Arch linux with KDE 4.5.5. The file(s) are extracted correctly, and I wonder, if this bug can _finally_(!) be closed or if the Arch-devs applied some patch to the package.

Package info: 
local/kdeutils-ark 4.5.5-1 (kde kdeutils)
    Archiving Tool

Regards,
drm
Comment 67 Kai Uwe Broulik 2011-01-23 15:54:07 UTC
Shouldn‘t we care about the main area of distribution of KDE first, which is Linux? There are more decent packaging programs than this weird ark thing on windows, so no need to port this in the first place. It should just work on Linux, Windows is another story and I doubt anyone would use Ark on Windows anyway because it s…
Comment 68 Raphael Kubo da Costa 2011-01-23 16:11:55 UTC
I just did some tests here, and I was able to extract password-protected 7z, rar and zip files here (I don't think there are other archive formats supported by Ark which can be password-protected).

The only missing bit is header-protected rar files (the ones created with 'rar a -hp<password>'), which is likely to be solved by the KPtyProcess stuff.
Comment 69 jasmintee 2011-01-23 16:35:22 UTC
(In reply to comment #68)
> I just did some tests here, and I was able to extract password-protected 7z,
> rar and zip files here (I don't think there are other archive formats supported
> by Ark which can be password-protected).
> 
> The only missing bit is header-protected rar files (the ones created with 'rar
> a -hp<password>'), which is likely to be solved by the KPtyProcess stuff.

Tried it too, and it works (except header-protected files). Will this be fixed for linux/bsd in KDE SC 4.6? Would be great.

Regards,
drm
Comment 70 Alexey Shildyakov 2011-01-23 17:53:56 UTC
Summary. Problem with:
 - header-protected RAR archives (-hp option)
 - 7z arhives with header encryption (-mhe option)
Comment 71 Raphael Kubo da Costa 2011-01-24 01:36:48 UTC
Hi all.

I've pushed some commits to trunk which should fix the remaining issues with header-protected rar and 7z files -- KPtyProcess support is back in non-Windows platforms, and we degrade as nicely as possible on Windows (I just can't check that as I don't have a Windows machine).

I'd appreciate if any of you could give test these commits (namely, r1216556, r1216557, r1216558 and r1216559) and check if everything is OK -- I tested header- and non-header-protected zip, rar and 7z files, and all of them could be listed and extracted properly.

Since these commits are a bit big, I'd like to have someone who hasn't written them to test before backporting to the 4.6 branch.

Thanks.
Comment 72 Aaron Lewis 2011-01-24 09:32:30 UTC
Tested latest commit on Ark in trunk , header protected RAR now works when
opening with Ark , while Dolphin's service menu isn't luck enough.
Selecting "Extract Here" doesn't work ( i didn't actually any changes on
my screen , no Password dialog , no progress , no files at all )

(I've tested on Gentoo , KDE overlay)

-Aaron
Comment 73 Raphael Kubo da Costa 2011-01-24 17:00:50 UTC
Can you svn up and re-check? r1216762 should have solved the issue.
Comment 74 Aaron Lewis 2011-01-25 09:35:39 UTC
Yes , it's solved after upgrade , i haven't met any other problems at
present.

On Tue, Jan 25, 2011 at 12:01 AM, Raphael Kubo da Costa <kubito@gmail.com>wrote:

> https://bugs.kde.org/show_bug.cgi?id=35371
>
>
>
>
>
> --- Comment #73 from Raphael Kubo da Costa <kubito gmail com>  2011-01-24
> 17:00:50 ---
> Can you svn up and re-check? r1216762 should have solved the issue.
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 75 Raphael Kubo da Costa 2011-01-27 02:14:37 UTC
There's still one remaining problem I've noticed: when one uses Ark's service menus ("Extract Here" etc) and inputs a wrong password for a header-protected archive, Ark will still try to extract it nonetheless -- for RAR files, this means the progress dialog will be shown together with an 'Invalid Password' dialog, and 7z files make Ark loop forever.

I'll work on this before backporting everything.
Comment 76 Raphael Kubo da Costa 2011-02-15 17:49:03 UTC
*** Bug 266387 has been marked as a duplicate of this bug. ***
Comment 77 Raphael Kubo da Costa 2011-04-03 18:41:21 UTC
*** Bug 269665 has been marked as a duplicate of this bug. ***
Comment 78 Raphael Kubo da Costa 2011-05-01 06:24:45 UTC
*** Bug 272119 has been marked as a duplicate of this bug. ***
Comment 79 Ettore Atalan 2011-05-21 01:34:35 UTC
Ark 2.16 still has problems with encrypted (incl. filenames) 7zip archives.

Opening such an archive, Ark's loading bar is going back and forth, but nothing happens.
Comment 80 Dotan Cohen 2011-05-21 14:47:05 UTC
@Ettore Atalan: please attach such an archive to the bug. Thanks.
Comment 81 Ettore Atalan 2011-05-21 15:36:19 UTC
Created attachment 60202 [details]
New crash information added by DrKonqi

ark (2.16) on KDE Platform 4.6.2 (4.6.2) using Qt 4.7.2

- What I was doing when the application crashed:

I was trying to open the following encrypted test.7z archive (password: test).

-- Backtrace (Reduced):
#6  QSemaphore::release (this=0x21, n=1) at thread/qsemaphore.cpp:161
[...]
#8  0x00007f4d2a664b22 in Kerfuffle::CliInterface::readStdout(bool) () from /usr/lib/libkerfuffle.so.4
#9  0x00007f4d2a664eeb in Kerfuffle::CliInterface::processFinished(int, QProcess::ExitStatus) () from /usr/lib/libkerfuffle.so.4
#10 0x00007f4d2a66508c in Kerfuffle::CliInterface::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkerfuffle.so.4
[...]
#12 0x00007f4d2813717f in QProcess::finished (this=<value optimized out>, _t1=0, _t2=QProcess::CrashExit) at .moc/release-shared/moc_qprocess.cpp:142
Comment 82 Ettore Atalan 2011-05-21 15:38:10 UTC
Created attachment 60203 [details]
encrypted test.7z archive (password: test)

Ark crashed trying to open it.
Comment 83 Raphael Kubo da Costa 2011-05-23 04:26:55 UTC
Well, as I said in comment #75, most of the fixes are only present in trunk (soon to be KDE SC 4.7.0), as I have not covered that case I mentioned in the same comment yet. The file attached in comment #82 works fine here, for example.
Comment 84 Raphael Kubo da Costa 2011-05-23 06:27:53 UTC
I'd appreciate if people running trunk could svn up to r1233141 or later and check if everything is working fine -- this mentioned revision should fix what I mentioned in comment #75, even though the error message currently looks quite ugly.

I think everything is minimally in place to mark this bug as fixed, so I'll start checking if things can (and should) be backported to the 4.6 branch.
Comment 85 Raphael Kubo da Costa 2011-06-01 22:35:08 UTC
SVN commit 1234597 by rkcosta:

Backport r1216556, r1216557, r1216558, r1216559, r1216762, r1216763, r1224452, r1233140 and r1233141 (!!).

This should make password support in header-protected archives work again.

As support for password-protected archives with unencrypted headers
was already present, this should finish minimally resolving bug 35371
once more. More work on user-visible messages (status messags, error
messages etc) is probably needed, but not essential.

BUG: 35371
FIXED-IN: 4.6.4

--

r1216556 by rkcosta:

cliinterface: Move the qRegisterMetaType code to the constructor.

It is going to be run only once anyway, so it does not make much sense
to run the check in every process call.

--

r1216557 by rkcosta:

cliinterface: Merge create the process creation and execution methods.

Inpired by what Okular does in its comicbook generator, it also makes
sense for us to remove the process we run in the same method (ie
executeProcess()).

findProgramAndCreateProcess, createProcess and executeProcess have
been merged: the process is now crated, run and destroyed in the same
method, which makes us not need to wory about deleting the process in
different places.

While at it, doKill()'s implementation could also be simplified, as we
waitForFinished() right after calling KProcess::start(), so we need
not call it a few more times in doKill().

--

r1216558 by rkcosta:

cliinterface: Use KPtyProcess on non-Windows platforms.

Once again inspired by Okular's comicbook generator (and also by Ark's
code circa the 4.2 release, which also seems to have borrowed the same
ideas from Okular), we now use a KPtyProcess on non-Windows platforms.

Some programs (such as unrar) open a TTY in occasions such as showing
password prompts, as they usually use getpass(3).

This is the first step towards supporting header-protected rar and 7z
files.

--

r1216559 by rkcosta:

cliinterface: Add the PasswordPromptPattern parameter.

Plugins can now specify a regular expression that matches password
prompts, which are now detected by CliInterface.

Header-protected rar and 7z files should be working now.

--

r1216762 by rkcosta:

archivebase: Run user queries on the internal ListJob.

After the recent commits, a password may be prompted on the archive's first
listing (listIfNotListed()) if the archive is header-protected.

We now process this occasional user query, so Ark does not get stuck when
extracting header-protected files in batch extraction mode.

--

r1216763 by rkcosta:

cliinterface: Remove m_program, as it is not needed anymore.

--

r1224452 by rkcosta:

cliinterface: Set the correct boolean value after QEventLoop::exec().

QEventLoop::exec() does not return an int, but a bool, and 0 means it
ran successfully -- however, it will translate into false after the
implicit cast, which is the inverse of what we want.

--

r1233140 by rkcosta:

cliinterface: Wait a few seconds before killing the process.

In some cases, failOperation() will try to kill an application which
is already in the process of finishing gracefully, so it is better to
wait a few seconds before trying to kill the process.

--

r1233141 by rkcosta:

cliinterface: Do not reset the password after a wrong one was entered.

This partially reverts r964726. There does not seem to be any solid
reason for resetting the password like this, and there is at least one
reason not to do so: when in batch-extraction mode, addExtraction()
will create a ListJob to check if an archive has a single folder. If
the archive is header-encrypted, it will ask for a password. In case a
wrong password is entered, preserving it means the coming
ExtractionJob will use the wrong password and finally show the
"Incorredt password" error message which was not shown before (and
cancel the forthcoming jobs).

This should fix the issue in comment #75 of bug 35371.

 M  +3 -0      kerfuffle/CMakeLists.txt  
 M  +8 -0      kerfuffle/archivebase.cpp  
 M  +1 -0      kerfuffle/archivebase.h  
 M  +103 -65   kerfuffle/cliinterface.cpp  
 M  +47 -4     kerfuffle/cliinterface.h  
 M  +2 -0      plugins/cli7zplugin/cliplugin.cpp  
 M  +2 -0      plugins/clirarplugin/cliplugin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1234597
Comment 86 Luke 2011-06-01 23:23:16 UTC
HALLELUJAH!!! 4.7 is going to be great!
Comment 87 Raphael Kubo da Costa 2011-07-13 18:56:02 UTC
*** Bug 277715 has been marked as a duplicate of this bug. ***
Comment 88 Raphael Kubo da Costa 2011-08-16 08:53:02 UTC
*** Bug 280176 has been marked as a duplicate of this bug. ***
Comment 89 Christopher Yeleighton 2012-01-23 12:49:45 UTC
Ahem.

As of 2.17, encrypted zipped files still extract to empty files.  

Given that libzip does not support encryption, there are two things we should do:

  1. 
Report the problem upstream (and post an FTR here).

  2. 
Until the problem is fixed upstream, use something that works (e.g. the unzip tool in konsole).

Please reopen.
Comment 90 Raphael Kubo da Costa 2012-01-23 13:10:13 UTC
(In reply to comment #89)
> Ahem.
> 
> As of 2.17, encrypted zipped files still extract to empty files.

It works perfectly fine here. Can you attach a file which isn't extracted correctly?

> Given that libzip does not support encryption, there are two things we should
> do:

Ark hasn't used libzip for a few years, we use infozip (ie. the unzip tool).
Comment 91 Christopher Yeleighton 2012-01-23 23:07:57 UTC
(In reply to comment #90)
> (In reply to comment #89)
> > Ahem.
> > 
> > As of 2.17, encrypted zipped files still extract to empty files.
> 
> It works perfectly fine here. Can you attach a file which isn't extracted
> correctly?

It was a one-time failure.  OOM?  timeout?

> 
> > Given that libzip does not support encryption, there are two things we should
> > do:
> 
> Ark hasn't used libzip for a few years, we use infozip (ie. the unzip tool).

Oh, that is good.
Comment 92 pierre 2013-07-18 15:35:54 UTC
Created attachment 81182 [details]
New crash information added by DrKonqi

ark (2.19) on KDE Platform 4.10.5 using Qt 4.8.4

- What I was doing when the application crashed:
I sas trying to open a zip file with the wrong pwd.

-- Backtrace (Reduced):
#5  QString::operator= (this=0x90, other=...) at tools/qstring.cpp:1411
#6  0x00007f24595d4e10 in QIODevice::setErrorString (this=this@entry=0x7f244400cd90, str=...) at io/qiodevice.cpp:1614
#7  0x00007f245961d603 in QProcessPrivate::waitForFinished (this=this@entry=0x7f24440010c0, msecs=msecs@entry=5) at io/qprocess_unix.cpp:1233
#8  0x00007f24595d6f6e in QProcess::waitForFinished (this=0x7f244400cd90, msecs=msecs@entry=5) at io/qprocess.cpp:1759
#9  0x00007f245bb06d8b in Kerfuffle::CliInterface::doKill (this=0x149f700) at ../../kerfuffle/cliinterface.cpp:685
Comment 93 jeremy9856 2014-11-09 15:41:50 UTC
I'm on Netrunner 14 with kubuntu-backports enabled and Ark cannot extract password-protected archives. This bug is supposed to be fixed but I have this problem...

Ark don't ask for password and extract a "dummy" file

$ dpkg -l | grep ark
ii  ark                                         4:4.14.2-0ubuntu1~ubuntu14.04~ppa1                  amd64        archive utility

$ ark -v
Qt : 4.8.6
Plate-forme de développement de KDE : 4.14.2
Ark : 2.19
Comment 94 Norbert Lederbauer 2014-11-10 00:00:34 UTC
Tryed to open a password protected .zip file from dropbox. NO problems. (I just have to remenber the password.) I'm on Kubuntu 14.04, the ark version is 2.19, KDE 4.13.3
Comment 95 jeremy9856 2014-11-11 06:51:48 UTC
Maybe this is related to kubuntu-backports with KDE 4.14.2 ?
Comment 96 Raphael Kubo da Costa 2014-11-11 10:02:18 UTC
What archive type are you trying to extract? Can you attach a sample here?
Comment 97 jeremy9856 2014-11-11 10:11:35 UTC
Created attachment 89533 [details]
Zipped jpg. Password : 123

Any zipped file with a password failed to be extracted.
Here is a sample that doesn't work.
Comment 98 Raphael Kubo da Costa 2014-11-11 12:05:12 UTC
This specific sample you've attached seems to use a more recent archive format than infozip (which provides the zip and unzip commands) supports. If I invoke unzip manually on Debian sid, I get this:

   skipping: turntable-music-hd-wallpaper-1920x1080-1781.jpg  need PK compat. v5.1 (can do v4.6)

Now if I create a sample encrypted zip archive myself (zip -e foo.zip turntable-music-hd-wallpaper-1920x1080-1781.jpg) and then try to extract it with Ark, I also get an empty archive. This is most likely caused by Debian having patched Ark to use libarchive instead of the infozip backend for zip files, and there's no code in the libarchive backend to handle passwords. Distros like Ubuntu and NetRunner then inherited this patch.

This is a downstream problem, and I'd start with pinging your distro about this issue. Meanwhile, one workaround would be adding "application/zip;" back to the "MimeType" line in /usr/share/kde4/services/kerfuffle_clizip.desktop and then running "kbuildsycoca4".
Comment 99 jeremy9856 2014-11-11 12:11:37 UTC
Ok thank you very much.
I will show your answer to Netrunner support.
Comment 100 Leszek Lesner 2014-11-11 12:29:54 UTC
Ubuntu and therefor Netrunner do not use the libarchive patch by debian and so use the infozip backend provided by upstream.
So that shouldn't be the problem here.
Comment 101 Raphael Kubo da Costa 2014-11-11 12:51:12 UTC
Are you sure? I still see it there: https://bazaar.launchpad.net/~kubuntu-packagers/kubuntu-packaging/ark/files/head:/debian/patches/
Comment 102 Leszek Lesner 2014-11-11 13:07:27 UTC
I am talking about this package here: http://packages.ubuntu.com/trusty/ark
Comment 103 Raphael Kubo da Costa 2014-11-11 13:20:16 UTC
... Which has KDE 4.13. http://packages.ubuntu.com/utopic/ark already incorporates the patch from Debian, and Jeremy was using a backports repository that probably also does.

It might be the case that NetRunner's official packages are based on an older Ubuntu release (I'm guessing, since I don't use NetRunner myself), but from the Ubuntu commit logs the packagers seem to be periodically syncing from Debian without disabling this patch.
Comment 104 Florian Hubold 2014-11-11 16:55:51 UTC
In any case, isn't that totally out of scope for this _resolved_ bugreport?
Ark asks for the password correctly. Granted, it could show an indication that the used backend couldn't handle the archive format, but that would be something for a separate report, no?
Comment 105 Thomas Weissel 2015-03-05 09:04:48 UTC
I'm sorry to say that i just tried to open a password protected zip file on kubuntu 15.04 beta and ark didn't show me a password dialog.. it just extracted the zipped pdf file and the file was unreadable..

using a terminal and "unzip" i got this error message:

unzip KL_1.zip 
Archive:  KL_1.zip
Inhalte sind verschluesselt
   skipping: KL_1.pdf  need PK compat. v5.1 (can do v4.6)


unzipping with a terminal and 7zip works fine but isn't really a solution for every user

since ARK should at least show a "password dialog" and/or show an error message i suggest to reopen this bug :(
Comment 106 Juan Navarro 2015-03-21 12:35:59 UTC
Ark does NOT ask for password in order to extract password-protected zip files
Using Ark Version 2.19
Using KDE Development Platform 4.14.2

Proof:
$ zip -r -P mypassword TestFile.zip TestFile.pdf
Option 1) Open zip file with Ark GUI, extract file.
Option 2) $ ark -b TestFile.zip

Both Options produce an invalid (unreadable) pdf file.
Comment 107 Juan Navarro 2015-03-21 12:37:12 UTC
Ark does NOT ask for password in order to extract password-protected zip files.
Using:
- Ark 2.19
- KDE Development Platform 4.14.2
- Linux Mint 17.1

Proof:
$ zip -r -P mypassword TestFile.zip TestFile.pdf
Option 1) Open zip file with Ark GUI, extract file.
Option 2) $ ark -b TestFile.zip

Both Options produce an invalid (unreadable) pdf file.
Comment 108 Mateusz 2015-06-22 11:21:27 UTC
Ark does not ask for a password when extracting password protected archives, resulting extracted files to be unreadable.

ark --version
Qt: 4.8.6
KDE Development Platform: 4.14.6
Ark: 2.19

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:        15.04
Codename:       vivid
Comment 109 jeremy9856 2015-06-22 11:37:48 UTC
This problem happen because of the use of libarchive plugin in debian and ubuntu.
The use of libarchive plugin is required because of this kind of problem :
https://bugs.kde.org/show_bug.cgi?id=319712

But that cause some other problems like this one and this other one :
https://bugs.kde.org/show_bug.cgi?id=348944

I think that we should avoid the use of libarchive plugin with Ark and for this to happen Ark have to be fixed (https://bugs.kde.org/show_bug.cgi?id=319712).
Comment 110 jeremy9856 2015-08-18 15:27:38 UTC
Good news, the Debian Patch that made Ark use libarchive plugin have been removed from Kubuntu!
https://bugs.launchpad.net/ubuntu/+source/ark/+bug/1404239

So now Ark can extract password-protected archives on Kubuntu. But it seems to don't always work.
If you try to create a password-protected archives with Ark or try the attachment "encrypted test.7z archive (password: test)" it will work. 

But if you try the attachment "Zipped jpg. Password : 123" it won't.
Comment 111 jeremy9856 2015-11-27 21:47:24 UTC
I wanted to thank you guys to have fixed these bugs bug 319712, bug 348944 and this one.

That said Ark can't extract attachment "Zipped jpg. Password : 123". It ask for password but don't seem to do anything. The archive was created with file-roller on Netrunner 14 I think. 

Tested on Manjaro with ark 15.08.3.
Comment 112 jeremy9856 2015-12-09 17:23:04 UTC
For the record, according to this comment from Elvis, the attachment "Zipped jpg. Password : 123" can be extracted with Ark 15.12 using the default prefered p7zip backend for zip archives.
Thanks !

http://www.aelog.org/a-closer-look-to-ark-15-12/#comment-496
Comment 113 noric 2016-02-09 23:24:02 UTC
For those on Mint 17 KDE (= Kubuntu 14.04), the workaround proposed by Raphael Kubo da Costa in comment #98 works.
I quote it for reference:
"... one workaround would be adding "application/zip;" back to the "MimeType" line in /usr/share/kde4/services/kerfuffle_clizip.desktop and then running "kbuildsycoca4"."