aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/ocda/io_in/read_zip_pod.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/ocda/io_in/read_zip_pod.d')
-rw-r--r--src/sisudoc/ocda/io_in/read_zip_pod.d6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sisudoc/ocda/io_in/read_zip_pod.d b/src/sisudoc/ocda/io_in/read_zip_pod.d
index d0eb65a..18a957c 100644
--- a/src/sisudoc/ocda/io_in/read_zip_pod.d
+++ b/src/sisudoc/ocda/io_in/read_zip_pod.d
@@ -64,11 +64,15 @@ template spineExtractZipPod() {
import std.stdio;
import std.string : indexOf;
import sisudoc.ocda.zstd;
+ import sisudoc.ocda.io_in.carried_names : MAX_POD_ENTRY_COUNT;
/+ security limits for zip extraction +/
enum size_t MAX_ENTRY_SIZE = 50 * 1024 * 1024; /+ 50 MB per entry +/
enum size_t MAX_TOTAL_SIZE = 500 * 1024 * 1024; /+ 500 MB total +/
- enum size_t MAX_ENTRY_COUNT = 500; /+ max entries in archive +/
+ /+ ↓ the entry count now comes from carried_names, so that the writer is
+ held to the same number the reader enforces.
+ +/
+ alias MAX_ENTRY_COUNT = MAX_POD_ENTRY_COUNT;
enum size_t MAX_PATH_DEPTH = 10; /+ max path components +/
/+ allowed entry name pattern: alphanumeric, dots, dashes, underscores, forward slashes +/