summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-15 16:29:44 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-16 12:49:10 +0200
commitf4ede27cdbbb4f55bb963130295a28a89a833d94 (patch)
treefefcca04d1fff7e897e13da0ac3fcc4bef70a3d4 /lib/public
parent69341e4306259430533cf66fd0a76688c7c8e6ab (diff)
downloadnextcloud-server-f4ede27cdbbb4f55bb963130295a28a89a833d94.tar.gz
nextcloud-server-f4ede27cdbbb4f55bb963130295a28a89a833d94.zip
refactor: Remove deprecated `Util` function for filename validation to `FilenameValidator`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Util.php34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 4cee9addf10..17794810c1a 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -18,7 +18,6 @@ use OCP\L10N\IFactory;
use OCP\Mail\IMailer;
use OCP\Share\IManager;
use Psr\Container\ContainerExceptionInterface;
-use Psr\Log\LoggerInterface;
/**
* This class provides different helper functions to make the life of a developer easier
@@ -489,39 +488,6 @@ class Util {
}
/**
- * Get a list of characters forbidden in file names
- * @return string[]
- * @since 29.0.0
- */
- public static function getForbiddenFileNameChars(): array {
- // Get always forbidden characters
- $invalidChars = str_split(\OCP\Constants::FILENAME_INVALID_CHARS);
- if ($invalidChars === false) {
- $invalidChars = [];
- }
-
- // Get admin defined invalid characters
- $additionalChars = \OCP\Server::get(IConfig::class)->getSystemValue('forbidden_chars', []);
- if (!is_array($additionalChars)) {
- \OCP\Server::get(LoggerInterface::class)->error('Invalid system config value for "forbidden_chars" is ignored.');
- $additionalChars = [];
- }
- return array_merge($invalidChars, $additionalChars);
- }
-
- /**
- * Returns whether the given file name is valid
- * @param string $file file name to check
- * @return bool true if the file name is valid, false otherwise
- * @deprecated 8.1.0 use OCP\Files\Storage\IStorage::verifyPath()
- * @since 7.0.0
- * @suppress PhanDeprecatedFunction
- */
- public static function isValidFileName($file) {
- return \OC_Util::isValidFileName($file);
- }
-
- /**
* Compare two strings to provide a natural sort
* @param string $a first string to compare
* @param string $b second string to compare