mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
fix: keep filesystem auth lint clean
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
committed by
Neil
co-authored by
Orca
parent
859d111f28
commit
ea11f524b5
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user