Skip to main content

Function: validatePluginPath()

validatePluginPath(pluginPath, allowedDirs): object

Defined in: .source/wunderland/src/security/FolderPermissions.ts:357

Validates a plugin or hook path stays within allowed directories.

Parameters​

pluginPath​

string

Path to the plugin/hook file

allowedDirs​

string[]

Directories the plugin is allowed to be in

Returns​

object

Validation result

allowed​

allowed: boolean

reason?​

optional reason?: string