contains-path-traversal
Version:
🚶 Does this string contain path traversal?
14 lines (12 loc) • 336 B
TypeScript
type Options = {
/**
* Maximum number of decode iterations to perform.
* Default: 4
*/
maxIterations?: number;
};
/**
* Check for path traversal attempts in the given pathname.
*/
declare function containsPathTraversal(pathname: string, { maxIterations }?: Options): boolean;
export { containsPathTraversal };