Admin panel and account routes have no authentication at all
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 13
- フォーク
- 0
- 平均マージ
- 2時間 4分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
kiat/codeAssist のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
kiat/codeAssist#391 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
kiat/codeAssist#364 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
kiat/codeAssist#393 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 63/100
kiat/codeAssist#392 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
kiat/codeAssist#390 ·
kiat/codeAssist の issue をすべて見る
似ている issue
-
documentation pkg: sphinx-needs
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
useblocks/sphinx-needs#2255 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
home-assistant/core#186538 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
btclib-org/btclib-secp256k1#1181 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pyrite-wiki/pyrite#917 ·
メンテナーはふだん 1 日以内に返信