Practice · 2 of 3
Canonicalizing Path Sandboxer
CHALLENGE
Difficulty: advanced+25 XP
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.
Press Submit to check your solution.
Back to lesson: Practice: Practice: Hardening Battery