• 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
alembic Loading commit data...
deploy Loading commit data...
scripts Loading commit data...
src Loading commit data...
tests Loading commit data...
.env.example Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
alembic.ini Loading commit data...
docker-compose.yml Loading commit data...
requirements-remix.txt Loading commit data...
requirements.txt Loading commit data...
setup.sh Loading commit data...