Skip to main content

Practice · 3 of 3

Injection-Safe Shell Quoting

CHALLENGE
Difficulty: advanced+25 XP

Implement shellQuote so the output, when passed to sh -c 'printf %s '<quoted>'', always yields exactly the original argument — for every hostile input in the battery.

Back to lesson: Practice: Practice: Hardening Battery