Bug #79634 [Nab]: Could not open password protected zip archive
| From: | cmb@php.net | Date: | Tue, 26 May 2020 14:00:24 +0000 |
| Subject: | Bug #79634 [Nab]: Could not open password protected zip archive | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227173@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79634&edit=1
ID: 79634
Updated by: cmb@php.net
Reported by: freshprince dot 2b at gmx dot net
Summary: Could not open password protected zip archive
Status: Not a bug
Type: Bug
Package: Zip Related
Operating System: Mac
PHP Version: 7.4.6
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Oh, I just learned that classic PKWARE encryption will only be
supported as of libzip 1.7.0[1], so stay tuned!
[1] <https://github.com/nih-at/libzip/pull/153>
Previous Comments:
------------------------------------------------------------------------
[2020-05-26 13:23:56] freshprince dot 2b at gmx dot net
Ok, then it was my fault :)
But what would be the correct encryption method to work with default unzip tools? In the
documentation I read "The encryption method defined by one of the ZipArchive::EM_
constants."
With "EM_NONE" there is no password prompt and with "EM_AES_128",
"EM_AES_192" and "EM_AES_256" the same situation will occure.
------------------------------------------------------------------------
[2020-05-26 11:22:12] cmb@php.net
Thanks! That was what I expected. So this issue doesn't look to
be a problem of PHP, but rather limited Zip support by the other
tools you're using. Consider to file respective feature requests
to the vendors of these tools, or for best portability don't use
EM_AES_* encryption (but be aware that the classic Zip encryption
is very weak).
------------------------------------------------------------------------
[2020-05-26 11:13:55] freshprince dot 2b at gmx dot net
> I meant, please try to open the archive created by PHP with 7-zip.
I can open archive created by PHP with 7-zip.
------------------------------------------------------------------------
[2020-05-26 09:05:28] cmb@php.net
I meant, please try to open the archive created by PHP with 7-zip.
------------------------------------------------------------------------
[2020-05-26 08:53:27] freshprince dot 2b at gmx dot net
> 'unsupported compression method 99'
Is the output of a working zip archive (without line breaks) and the archive with the infinite
password prompt.
A try with the 7-zip[1] was working as expected with all zip archives.
Should not be there a way to create and extract a password protected zip archive, without any
additional tools? Or do I understand it wrong?
[1] <http://www.koozie.org/blog/2014/08/creating-aes256-encrypted-zip-archive-files-mac-command-line/#aes256-encrypted-zip-files>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=79634
--
Edit this bug report at https://bugs.php.net/bug.php?id=79634&edit=1