josafath.dev
← All projects

~/simple-video-chat · Since 2021

Study Partner

One-to-one video calls for study partners.

Create a private room, send the invite link to your partner and talk face to face with video, audio and chat. Video goes straight between the two browsers with WebRTC; the server only introduces them.

ExpressGitHub ActionsJavaScriptMongoDBNode.jsSocket.IOWebRTC

Versions

  1. Original2021

    Rooms by name, credentials in the code and XSS in the chat.

  2. v12026

    The same architecture with its security problems fixed, private rooms and CI.

What changed

AspectBeforeAfter
CredentialsWritten in the code→ In environment variables
ChatMessages inserted as HTML (XSS)→ Messages inserted as text
RoomsAnyone could join by guessing the name→ Private invite link with a 128-bit token
LoginNo attempt limit→ 10 failed attempts per IP every 15 minutes