mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
Check for invalid characters in paths
This commit is contained in:
parent
b822af84c5
commit
4ca3c3df22
5 changed files with 151 additions and 7 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace Icewind\SMB;
|
||||
|
||||
class NativeShare implements IShare {
|
||||
class NativeShare extends AbstractShare {
|
||||
/**
|
||||
* @var Server $server
|
||||
*/
|
||||
|
|
@ -28,6 +28,7 @@ class NativeShare implements IShare {
|
|||
* @param string $name
|
||||
*/
|
||||
public function __construct($server, $name) {
|
||||
parent::__construct();
|
||||
$this->server = $server;
|
||||
$this->name = $name;
|
||||
$this->state = new NativeState();
|
||||
|
|
@ -56,6 +57,7 @@ class NativeShare implements IShare {
|
|||
}
|
||||
|
||||
private function buildUrl($path) {
|
||||
$this->verifyPath($path);
|
||||
$url = sprintf('smb://%s/%s', $this->server->getHost(), $this->name);
|
||||
if ($path) {
|
||||
$path = trim($path, '/');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue