Practice · 1 of 3
Defuse Deserialization
CHALLENGE
Difficulty: intermediate+25 XP
Implement load_payload(data: bytes) that safely decodes untrusted payloads: try JSON (utf-8) and return the object; on any failure raise ValueError('unsafe payload'). The docstring must promise never to use pickle (graders check json is used and pickle is NOT).
Press Submit to check your solution.
Back to lesson: Practice: Security Audit Drills