Ferdinand Thiessen
e3b34891b0
chore: migrate to PHPUnit 11
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-11-05 15:42:33 +07:00
Robin Appelman
aa15f9d16d
chore: run rector
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +07:00
Ferdinand Thiessen
35a27b5fd5
fix(FilenameValidator): use `_` as default replacement for invalid chars
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-06-18 09:44:57 +07:00
Ferdinand Thiessen
9422b6d6d0
test: adjust library tests for PHPunit deprecations
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-28 11:20:15 +07:00
Joas Schilling
3e7db013c1
test: Fix non-static data providers
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:25:01 +07:00
Ferdinand Thiessen
6cf1870322
feat(FilenameValidator): allow to sanitize filenames
...
Share the filename sanitizing with the OCP filename validator.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-13 14:14:17 +07:00
Ferdinand Thiessen
254dd85664
fix(IFilenameValidator): correctly handle case insensitivity
...
- 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>
2025-03-21 01:00:58 +07:00
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