fix: keep filesystem auth lint clean

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H
2026-05-31 02:09:25 -07:00
committed by Neil
co-authored by Orca
parent 859d111f28
commit ea11f524b5
+1 -2
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
)