You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In contrast to zip_open(3), using zip_fdopen the archive can only be opened in read-only mode.
zip_open can't directly be used here because it would be a privilege escalation bug.
I think a 'real fix' would be making the CLI client process capable of high-level zip operations, but a clear 'unsupported in CLI server mode' exception would make debugging issues much simpler.
Standalone code, or other way to reproduce the problem
IN CLI SERVER MODE
$z = new ZipArchive();
$z->open('/tmp/foo.zip', ZIPARCHIVE::CREATE); // ALWAYS fails
Expected behavior
Ideally, it works, opening the zip as the CLI client user.
Better would be a clear exception saying why it will always fail
Actual behavior
open fails, invalid zip
The text was updated successfully, but these errors were encountered:
Describe the bug
hhvm/hphp/runtime/ext/zip/ext_zip.cpp
Line 45 in 908da97
https://libzip.org/documentation/zip_fdopen.html
zip_open can't directly be used here because it would be a privilege escalation bug.
I think a 'real fix' would be making the CLI client process capable of high-level zip operations, but a clear 'unsupported in CLI server mode' exception would make debugging issues much simpler.
Standalone code, or other way to reproduce the problem
IN CLI SERVER MODE
Expected behavior
Ideally, it works, opening the zip as the CLI client user.
Better would be a clear exception saying why it will always fail
Actual behavior
open fails, invalid zip
The text was updated successfully, but these errors were encountered: