• Aryan Noshirvnai's avatar
    Fix the two known security gaps: /remix auth+IDOR, Rooms websocket user_id forgery · 913721b5
    Aryan Noshirvnai authored
    POST /remix and GET /remix/{job_id} previously had no authentication at all -
    user_id was a raw client-supplied form field, and job status was fetchable by
    guessing sequential ids (IDOR). Both endpoints now require a logged-in user;
    RemixJob gets a new user_id column (migration 347da5d41656) so job status is
    scoped to its owner. Also closed an adjacent IDOR found while fixing this:
    library_song_ids sourcing now scopes to the caller's own library, not any
    song id.
    
    WS /social/rooms/{room_id}/ws took user_id as an unauthenticated query
    param - anyone could connect claiming to be any user. It now takes a JWT
    access token instead (browsers can't set WS headers, so it travels as a
    query param) and verifies it - signature, expiry, real user row - before
    accepting the connection.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
    913721b5
Name
Last commit
Last update
..
__init__.py Loading commit data...
config.py Loading commit data...
database.py Loading commit data...
security.py Loading commit data...