mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
feat: DoS prevention, #250
This commit is contained in:
+1
-2
@@ -37,8 +37,7 @@ export class MapFS {
|
||||
if (segment === '.' || segment === '') continue
|
||||
else if (segment === '..') {
|
||||
if (segments.length > 1 || segments[0] !== '') segments.pop()
|
||||
}
|
||||
else segments.push(segment)
|
||||
} else segments.push(segment)
|
||||
}
|
||||
return segments.join(this.sep)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user