Skip to content

PromptScript API


Function: isInsideCachePath()

isInsideCachePath(filePath, cachePath): boolean

Defined in: resolver/src/reference-hasher.ts:28

Verify that a resolved file path is contained within the cache directory. Prevents path traversal attacks via symlinks or ../ in reference paths.

Parameters

filePath

string

cachePath

string

Returns

boolean