feat: configure archive limits via git properties

Replaces the `DOKKU_ARCHIVE_MAX_SIZE` and `DOKKU_ARCHIVE_MAX_FILES` environment variables with global git properties (`archive-max-size` and `archive-max-files`), configurable via `dokku git:set --global` and surfaced through `dokku git:report --global`. Defaults remain `1073741824` bytes and `10000` entries.
This commit is contained in:
Jose Diaz-Gonzalez
2026-05-09 13:08:23 -04:00
parent 2df0791fcd
commit 9decf16ea1
5 changed files with 134 additions and 19 deletions

View File

@@ -37,7 +37,24 @@ curl -sSL https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-
Archive contents are validated before extraction to prevent path traversal and symlink escape attacks. Archives containing absolute paths, parent directory traversal entries (`..`), or symlinks pointing outside the extraction directory are rejected.
The following limits can be configured via environment variables:
The following limits can be configured via global git properties:
- `DOKKU_ARCHIVE_MAX_SIZE` - maximum archive size in bytes (default: `1073741824`, 1 GiB)
- `DOKKU_ARCHIVE_MAX_FILES` - maximum number of entries in an archive (default: `10000`)
- `archive-max-size` - maximum archive size in bytes (default: `1073741824`, 1 GiB)
- `archive-max-files` - maximum number of entries in an archive (default: `10000`)
```shell
dokku git:set --global archive-max-size 2147483648
dokku git:set --global archive-max-files 20000
```
Unset a property to restore the default:
```shell
dokku git:set --global archive-max-size
```
The current values can be inspected via the global git report:
```shell
dokku git:report --global
```