aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/FilenameValidatorTest.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(IFilenameValidator): correctly handle case insensitivityfix/file-name-validator-case-sensitivityFerdinand Thiessen2025-03-211-1/+91
| | | | | | | | - forbidden names and forbidden base names are case **insensitive** so we need to check all lowercase here. - add test that config value is also read case insensitive. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: `FilenameValidator::isForbidden` should only check forbidden filesFerdinand Thiessen2024-08-211-17/+7
| | | | | | And not forbidden basenames as this is used for different purposes. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(dav): Verify target path in `setName` instead of source pathFerdinand Thiessen2024-07-161-2/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* refactor: Migrate filename validation logic from `Storage` to ↵Ferdinand Thiessen2024-07-161-5/+83
| | | | | | `FilenameValidator` Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat: Add `forbidden_filename_basenames` config optionFerdinand Thiessen2024-07-151-27/+58
| | | | | | | | 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>
* feat: Add `IFilenameValidator` to have one consistent place for filename ↵Ferdinand Thiessen2024-07-091-0/+188
validation Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>