AOSSIE-Org / AOSSIE-Org/Resonate-Backend

Missing room existence validation in join-room allows tokens for non-existent rooms

Đang mở
#154 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
43
Fork
120
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Problem**
The join-room function generates LiveKit access tokens without verifying the room exists in Appwrite. Users can receive valid tokens for non-existent or deleted rooms, causing poor UX, wasted resources, and potential security issues.

**Affected Code**
functions/join-room/src/main.js

The function accepts roomName and uid, generates a token immediately, and returns success without checking room existence.

**Proposed Fix**
Add room existence validation by querying ROOMS_COLLECTION_ID before token generation. Return 404 if room doesn't exist.

**Acceptance Criteria**
- Room existence verified before token generation
- Returns 404 with clear error message if room not found
- Existing functionality unchanged for valid rooms
- Error handling follows existing patterns

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.