Ferdinand Thiessen
b9cc7bcec7
fix: `FilenameValidator::isForbidden` should only check forbidden files
...
And not forbidden basenames as this is used for different purposes.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-21 04:16:14 +07:00
Ferdinand Thiessen
322b3946d9
fix(dav): Verify target path in `setName` instead of source path
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-16 12:57:11 +07:00
Ferdinand Thiessen
69341e4306
refactor: Migrate filename validation logic from `Storage` to `FilenameValidator`
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-16 12:49:09 +07:00
Ferdinand Thiessen
bdbeabafa7
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>
2024-07-15 19:39:18 +07:00
Ferdinand Thiessen
46f1efac41
feat: Add `IFilenameValidator` to have one consistent place for filename 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>
2024-07-09 15:04:34 +07:00