summaryrefslogtreecommitdiffstats
path: root/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php')
-rw-r--r--apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php b/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php
index b53c253be08..454eb143e49 100644
--- a/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php
+++ b/apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php
@@ -10,13 +10,18 @@ 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"];
}
- protected function verifyPath($path) {
+ /**
+ * @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');
@@ -24,7 +29,10 @@ abstract class AbstractShare implements IShare {
}
}
- public function setForbiddenChars(array $charList) {
+ /**
+ * @param string[] $charList
+ */
+ public function setForbiddenChars(array $charList): void {
$this->forbiddenCharacters = $charList;
}
}