Practice ยท 2 of 3
Canonicalizing Path Sandboxer
Implement sandboxPath: split on '/', process segments against a stack, then require the canonical result to be under "/data". The battery includes escapes that contain no literal ".." pattern naively banned, and stays-legal paths that contain ".." legitimately.
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Practice: Hardening Battery