Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Latest
------

### Changes
* [#77](https://github.com/cleverage/archive-process-bundle/issues/77) Documentation: the `max_size` option of `archive_unzip` decompresses every entry once more to count the bytes, which makes the extraction about 77 % slower. Update documentation.
* [#75](https://github.com/cleverage/archive-process-bundle/issues/75) Documentation: the `import_archive` cookbook uses the `form` option of cleverage/ui-process-bundle 3.5 instead of the deprecated `entrypoint_type` and `constraints` UI options.
* [#73](https://github.com/cleverage/archive-process-bundle/issues/73) Documentation: the Flysystem storages of the `export_archive_upload` cookbook are configured with the format of league/flysystem-bundle 3.5 and later, the `adapter` / `options` format being deprecated since flysystem-bundle 3.5.

Expand Down
6 changes: 4 additions & 2 deletions docs/reference/tasks/unzip_task.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Options
| `filename` | `string` | **X** | | Path of the zip archive to extract. It must exist and be readable (`UnexpectedValueException`) |
| `destination` | `string` | **X** | | Directory where the archive content is extracted |
| `max_files` | `?int` | | `null` | Maximum number of entries of the archive (`null`: no limit) |
| `max_size` | `?int` | | `null` | Maximum total uncompressed size of the entries, in bytes (`null`: no limit) |
| `max_size` | `?int` | | `null` | Maximum total uncompressed size of the entries, in bytes (`null`: no limit). Every entry is decompressed once more to count its bytes, which makes the extraction about 77 % slower (see the notes) |

`filename` and `destination` are required, but they can be provided either in the task configuration or in the input.
They are validated when the task is executed, not at process initialization.
Expand Down Expand Up @@ -91,5 +91,7 @@ Notes
to protect the server against "zip bombs": they are checked before anything is extracted, and the task fails with a
`RuntimeException` when a limit is exceeded. `max_size` is checked on the sizes declared in the central directory of
the archive, then on the bytes actually decompressed from its entries (the declared sizes can be forged): the
archive is decompressed twice, up to `max_size` bytes, without writing anything before the extraction. An extraction failing
archive is decompressed twice, up to `max_size` bytes, without writing anything before the extraction. This extra
pass has a cost: the decompression time measured with `max_size` is about 77 % higher than without it. Set it for
untrusted archives only, and leave it to `null` (or rely on `max_files` alone) for archives you trust. An extraction failing
for another reason (e.g. a write error) may leave the entries already extracted in the destination directory.
Loading