Admin panel and account routes have no authentication at all
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- authentication, backend, security
Hướng nghiên cứu
Start with the listed handlers in backend/routes/user.py, then inspect the existing authentication and role-check helpers to understand how system-level admin access is represented. The issue also points to fetch calls in pages/admin/* and pages/editAccount/index.js; review those after the backend checks. Done means the listed routes reject unauthenticated or non-admin access and the frontend sends credentials; linked PR #378 is already open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The admin panel (pages/admin/*) and the account-edit page (pages/editAccount/index.js) call several backend routes that have no authentication check at all — not require_authenticated(), not any role check. Confirmed by reading each route directly:
get_all_courses,get_all_instructors,get_all_students(backend/routes/user.py) — return every course/instructor/student in the system to anyone who calls them, logged in or not.create_user,delete_user,admin_update_account(backend/routes/user.py) — let anyone create, delete, or edit any user account, no auth required.get_user_by_id,update_account(backend/routes/user.py) — let anyone read or modify any user's account details given their ID.get_instructor_by_eid,get_courses_by_instructor— similar unauthenticated lookups.
On the frontend, none of the corresponding fetch() calls in pages/admin/* or pages/editAccount/index.js send credentials: "include" either, but that's secondary — even with credentials, these routes don't check who (if anyone) is calling them, let alone whether they're an admin.
This is a real security gap: right now, anyone who knows (or guesses) a user ID can read or edit any account, and the entire admin panel's data is publicly readable with no login. Fixing it means adding an admin-role auth check (presumably a new check, since require_course_role is course-scoped and this is account/system-level) to each of these routes, then fixing the frontend fetches to send credentials once there's an auth check for them to matter against.
Found during a deep-dive audit of frontend/src fetch calls after Cecilia's review of PR #355, while checking for other instances of the missing-credentials pattern she found. Not currently causing a user-visible bug (no auth check to fail against yet), but a real, separate finding worth its own tracking given the security implications, especially before this platform goes live.
- Ngôn ngữ chính
- Python
- Star
- 13
- Fork
- 0
- Merge trung bình
- 2 giờ 4 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của kiat/codeAssist
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
kiat/codeAssist#391 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
kiat/codeAssist#364 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
kiat/codeAssist#393 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 63/100
kiat/codeAssist#392 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
kiat/codeAssist#390 ·
Tất cả issue của kiat/codeAssist
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
cellrishi-code/claude-skills-atlas#165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
open-webui/open-webui#32635 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Filters: ?field:ne=null matches NULL rows instead of non-NULL onesCó thể đã có người làm @rshdhere đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Netflix/metaflow-service#504 ·
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
gke-labs/kube-agents#3394 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A2A audit timestamps end in +00:00Z (invalid ISO 8601)Có thể đã có người làm @O1sumitkumar đã nhận hôm nay. Đang mởbug good first issue help wanted python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày