conventions.io

Tech Challenge

2026-10-12

🔐

Daily Tech Challenge

Cybersecurity

medium
Question 1 of 5

A marketplace lets sellers upload photos taken on their phones and serves the original files unchanged at public URLs using the handler below. A privacy review flags a serious risk to sellers who photograph items at home. What is it?

Example
@app.post("/listings/<int:lid>/photos")
def upload_photo(lid):
    f = request.files["photo"]
    if f.mimetype not in ("image/jpeg", "image/png"):
        abort(415)
    data = f.read()
    if len(data) > 8 * 1024 * 1024:
        abort(413)
    key = f"listings/{lid}/{uuid.uuid4()}.jpg"
    s3.put_object(Bucket="public-media", Key=key, Body=data,
                  ContentType=f.mimetype)
    return {"url": f"https://media.example.com/{key}"}

Monday, October 12, 2026 · A new challenge drops every day