11 changed files with 99 additions and 43 deletions
-
2apps/files_external/3rdparty/composer.json
-
12apps/files_external/3rdparty/composer.lock
-
12apps/files_external/3rdparty/composer/installed.json
-
26apps/files_external/3rdparty/icewind/smb/src/AbstractShare.php
-
25apps/files_external/3rdparty/icewind/smb/src/Connection.php
-
1apps/files_external/3rdparty/icewind/smb/src/ErrorCodes.php
-
10apps/files_external/3rdparty/icewind/smb/src/Exception/InvalidPathException.php
-
10apps/files_external/3rdparty/icewind/smb/src/Exception/NoLoginServerException.php
-
4apps/files_external/3rdparty/icewind/smb/src/NativeShare.php
-
2apps/files_external/3rdparty/icewind/smb/src/Server.php
-
38apps/files_external/3rdparty/icewind/smb/src/Share.php
@ -0,0 +1,26 @@ |
|||
<?php |
|||
/** |
|||
* Copyright (c) 2015 Robin Appelman <icewind@owncloud.com> |
|||
* This file is licensed under the Licensed under the MIT license: |
|||
* http://opensource.org/licenses/MIT |
|||
*/ |
|||
|
|||
namespace Icewind\SMB; |
|||
|
|||
use Icewind\SMB\Exception\InvalidPathException; |
|||
|
|||
abstract class AbstractShare implements IShare { |
|||
private $forbiddenCharacters; |
|||
|
|||
public function __construct() { |
|||
$this->forbiddenCharacters = array('?', '<', '>', ':', '*', '|', '"', chr(0), "\n", "\r"); |
|||
} |
|||
|
|||
protected function verifyPath($path) { |
|||
foreach ($this->forbiddenCharacters as $char) { |
|||
if (strpos($path, $char) !== false) { |
|||
throw new InvalidPathException('Invalid path, "' . $char . '" is not allowed'); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
<?php |
|||
/** |
|||
* Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> |
|||
* This file is licensed under the Licensed under the MIT license: |
|||
* http://opensource.org/licenses/MIT |
|||
*/ |
|||
|
|||
namespace Icewind\SMB\Exception; |
|||
|
|||
class InvalidPathException extends InvalidRequestException {} |
@ -0,0 +1,10 @@ |
|||
<?php |
|||
/** |
|||
* Copyright (c) 2014 Robin Appelman <icewind@owncloud.com> |
|||
* This file is licensed under the Licensed under the MIT license: |
|||
* http://opensource.org/licenses/MIT |
|||
*/ |
|||
|
|||
namespace Icewind\SMB\Exception; |
|||
|
|||
class NoLoginServerException extends ConnectException {} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue