MCPcopy Create free account
hub / github.com/error311/FileRise / isSafeFolderPath

Function isSafeFolderPath

public/js/folderManager.js:1659–1663  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

1657 DOM builders & DnD
1658----------------------*/
1659function isSafeFolderPath(p) {
1660 // Client-side defense-in-depth; server already enforces safe segments.
1661 // Allows letters/numbers/space/_-. and slashes between segments.
1662 return /^(root|(?!\.)[^/\0]+)(\/(?!\.)[^/\0]+)*$/.test(String(p || ''));
1663}
1664
1665const RECYCLE_BIN_ID = 'recycleBinRow';
1666

Callers 1

makeChildLiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected