Skip to content

craft-hub / assertWithinSpaceRoot

Function: assertWithinSpaceRoot() ​

assertWithinSpaceRoot(rootPath, relativePath): Promise<string>

Defined in: packages/craft-hub/src/document-spaces.ts:272

Verify a relative target path (or its nearest existing ancestor) remains inside the space root without symlink escape.

Parameters ​

rootPath ​

string

relativePath ​

string

Returns ​

Promise<string>

Released under the MIT License.