aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-02-23 02:22:12 +0100
committerJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-28 22:19:25 +0100
commit27642d3e6dc01a387762e0b13fc66557e0c835b2 (patch)
tree23e775bd6d604f7e7aed54576b57712fad34a490 /lib/private/legacy
parent281c8a49a78c70e19bb88b01f9c13a97472053d2 (diff)
downloadnextcloud-server-27642d3e6dc01a387762e0b13fc66557e0c835b2.tar.gz
nextcloud-server-27642d3e6dc01a387762e0b13fc66557e0c835b2.zip
fix: Enforce forbidden filename characters on backend
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_Util.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 3b6d9b8baec..42a0d9450b5 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -1112,8 +1112,8 @@ class OC_Util {
return false;
}
- foreach (str_split($trimmed) as $char) {
- if (str_contains(\OCP\Constants::FILENAME_INVALID_CHARS, $char)) {
+ foreach (\OCP\Util::getForbiddenFileNameChars() as $char) {
+ if (str_contains($trimmed, $char)) {
return false;
}
}