feat(core): implement tenant-scoped system store manager
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -24,8 +24,17 @@ final readonly class StoreReference
|
||||
throw new InvalidArgumentException('System-store service cannot be empty');
|
||||
}
|
||||
|
||||
if ($this->namespace === '') {
|
||||
throw new InvalidArgumentException('System-store namespace cannot be empty');
|
||||
if (
|
||||
$this->namespace === ''
|
||||
|| str_starts_with($this->namespace, '/')
|
||||
|| str_ends_with($this->namespace, '/')
|
||||
|| str_contains($this->namespace, '\\')
|
||||
|| str_contains($this->namespace, "\0")
|
||||
|| in_array('', explode('/', $this->namespace), true)
|
||||
|| in_array('.', explode('/', $this->namespace), true)
|
||||
|| in_array('..', explode('/', $this->namespace), true)
|
||||
) {
|
||||
throw new InvalidArgumentException('System-store namespace must be a normalized relative key');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user