diff options
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php')
-rw-r--r-- | apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php b/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php deleted file mode 100644 index 77f50e4ca9d..00000000000 --- a/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * SPDX-FileCopyrightText: 2015 Robin Appelman <robin@icewind.nl> - * SPDX-License-Identifier: MIT - */ - -namespace Icewind\SMB; - -use Icewind\SMB\Exception\InvalidPathException; - -abstract class AbstractShare implements IShare { - /** @var string[] */ - private $forbiddenCharacters; - - public function __construct() { - $this->forbiddenCharacters = ['?', '<', '>', ':', '*', '|', '"', chr(0), "\n", "\r"]; - } - - /** - * @param string $path - * @throws InvalidPathException - */ - protected function verifyPath(string $path): void { - foreach ($this->forbiddenCharacters as $char) { - if (strpos($path, $char) !== false) { - throw new InvalidPathException('Invalid path, "' . $char . '" is not allowed'); - } - } - } - - /** - * @param string[] $charList - */ - public function setForbiddenChars(array $charList): void { - $this->forbiddenCharacters = $charList; - } -} |