diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-07-15 19:10:52 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-07-15 19:39:18 +0200 |
commit | bdbeabafa7ee6596934f7a84c4574f434e12fe1f (patch) | |
tree | 90a17fca2e4b35ad68d9dfe9a273eb4a0d68b109 /config | |
parent | 8c571dda47e8fcbaa85513b90c80bc101375ca0f (diff) | |
download | nextcloud-server-bdbeabafa7ee6596934f7a84c4574f434e12fe1f.tar.gz nextcloud-server-bdbeabafa7ee6596934f7a84c4574f434e12fe1f.zip |
feat: Add `forbidden_filename_basenames` config option
This allows to configure forbidden filenames (the full filename like `.htaccess`)
and also forbidden basenames like `com0` where `com0`, `com0.txt` and `com0.tar.gz` will match.
We need this as only using basenames was too restrictive and will cause problems on some systems when updating.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'config')
-rw-r--r-- | config/config.sample.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 76b6532a19c..67110a1844a 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -1988,6 +1988,18 @@ $CONFIG = [ 'forbidden_filenames' => ['.htaccess'], /** + * Disallow the upload of files with specific basenames. + * + * The basename is the name of the file without the extension, + * e.g. for "archive.tar.gz" the basename would be "archive". + * + * Note that this list is case-insensitive. + * + * Defaults to ``array()`` + */ +'forbidden_filename_basenames' => [], + +/** * Block characters from being used in filenames. This is useful if you * have a filesystem or OS which does not support certain characters like windows. * |