From: Patrick Canterino Date: Mon, 2 Nov 2026 19:24:34 +0000 (+0100) Subject: Allow to set disallowed file extensions in Docker using an env variable X-Git-Tag: 4.8.0~9 X-Git-Url: https://git.p6c8.net/jirafeau/pcanterino.git/commitdiff_plain/4b26c67e408860c8ed61f8cf5bf3bd34a0f0ca24 Allow to set disallowed file extensions in Docker using an env variable --- diff --git a/docker/README.md b/docker/README.md index d170d70..619772a 100644 --- a/docker/README.md +++ b/docker/README.md @@ -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). +- `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 diff --git a/docker/docker_config.php b/docker/docker_config.php index d814a8e..c589a13 100644 --- a/docker/docker_config.php +++ b/docker/docker_config.php @@ -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, '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');