Skip to main content

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.

Back to lesson: Practice: Practice: Hardening Battery