Code RoomPickle deserializes untrusted data
HardPrep Room Coding #1884

Pickle deserializes untrusted data

Code reviewCode quality & reviewSenior–Staff~30 min

Review this Python task-queue worker.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix, specific and kind.

0:00 of about 30 min
Mark a line and say what kind of problem it is.0 findings
1import pickle, redis
2 
3r = redis.Redis()
4 
5def worker_loop():
6 while True:
7 _, raw = r.blpop('jobs')
8 job = pickle.loads(raw) # {'func': ..., 'args': [...]}
9 job['func'](*job['args'])
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.