fix: keep filesystem auth lint clean

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H 2026-05-30 05:52:18 -07:00 committed by Neil
parent 859d111f28
commit ea11f524b5
1 changed files with 1 additions and 2 deletions

View File

@ -52,8 +52,7 @@ export function isDescendantOrEqual(resolvedTarget: string, resolvedBase: string
// where relative('D:\\repo', 'C:\\etc\\passwd') returns absolute path 'C:\\etc\\passwd'
return (
rel !== '' &&
rel !== '..' &&
!rel.startsWith(`..${sep}`) &&
!(rel === '..' || rel.startsWith(`..${sep}`)) &&
!isAbsolute(rel) &&
resolve(resolvedBase, rel) === resolvedTarget
)