]> git.p6c8.net - jirafeau/pcanterino.git/commitdiff
Allow to set disallowed file extensions in Docker using an env variable
authorPatrick Canterino <patrick@patrick-canterino.de>
Mon, 2 Nov 2026 19:24:34 +0000 (20:24 +0100)
committerPatrick Canterino <patrick@patrick-canterino.de>
Mon, 2 Nov 2026 19:24:34 +0000 (20:24 +0100)
docker/README.md
docker/docker_config.php

index d170d70747b1867216f5087519df248445ca9a05..619772a01eba56aa2897b42c385997e14d6034e5 100644 (file)
@@ -101,6 +101,7 @@ Available options:
 - `UPLOAD_IP`: set one or more ip allowed to upload files (separated by comma).
 - `UPLOAD_IP_NO_PASSWORD`: set one or more ip allowed to upload files without password (separated by comma).
 - `PROXY_IP`: set one or more proxy ip (separated by comma).
 - `UPLOAD_IP`: set one or more ip allowed to upload files (separated by comma).
 - `UPLOAD_IP_NO_PASSWORD`: set one or more ip allowed to upload files without password (separated by comma).
 - `PROXY_IP`: set one or more proxy ip (separated by comma).
+- `DISALLOWED_EXTENSIONS`: forbid specific file extensions from being uploaded (separated by comma).
 - `STORE_UPLOADER_IP`: set to 1 or 0 to enable or disable keeping sender's IP with the _link_ file.
 - `DOWNLOAD_PASSWORD_REQUIREMENT`: set to 'optional' (default), 'required' or 'generated' to make a password for downloading optional, required or generated
 - `DOWNLOAD_PASSWORD_GEN_LEN`: set length of generated download passwords
 - `STORE_UPLOADER_IP`: set to 1 or 0 to enable or disable keeping sender's IP with the _link_ file.
 - `DOWNLOAD_PASSWORD_REQUIREMENT`: set to 'optional' (default), 'required' or 'generated' to make a password for downloading optional, required or generated
 - `DOWNLOAD_PASSWORD_GEN_LEN`: set length of generated download passwords
index d814a8e678303c029f31bb1adf7d72dfcc6184b7..c589a13508371b17246ebbe18ad654b0881b9231 100644 (file)
@@ -201,6 +201,7 @@ function run_setup(&$cfg)
     env_2_cfg_string_array($cfg, 'admin_ip');
     env_2_cfg_string_array($cfg, 'upload_ip_nopassword');
     env_2_cfg_string_array($cfg, 'proxy_ip');
     env_2_cfg_string_array($cfg, 'admin_ip');
     env_2_cfg_string_array($cfg, 'upload_ip_nopassword');
     env_2_cfg_string_array($cfg, 'proxy_ip');
+    env_2_cfg_string_array($cfg, 'disallowed_extensions');
     // this is a key value based value
     env_2_cfg_array_from_json($cfg, 'availabilities');
     env_2_cfg_bool($cfg, 'store_uploader_ip');
     // this is a key value based value
     env_2_cfg_array_from_json($cfg, 'availabilities');
     env_2_cfg_bool($cfg, 'store_uploader_ip');

patrick-canterino.de