More routes with no authentication check
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, python
- Ambito
- authentication, backend
Direzione di ricerca
Start by reading #366, the listed handlers in backend/routes/course.py, user.py, assignment.py, regrade_request.py and submission.py, and the helpers in util/auth.py. Check each route's callers and what access rule fits; then add authentication tests for 401, 403 and success cases. Done means every listed route has an appropriate check and its tests pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
While fixing #366 I scanned backend/routes/ for routes that never call require_authenticated, require_course_role, require_admin or one of the _verify_* helpers. These are left over. Each one needs a quick look to confirm it really has no check and to decide the right rule.
course.py
create_course: anyone can create a course and name any user as its instructor. The admin panel (pages/admin/courses/add.js) calls it.enroll_course: takesuser_idfrom the request body, so anyone with an entry code can enroll any user.leave_course: takesuser_idfrom the request body, so anyone can remove any student from any course.
user.py
get_user_by_email: returns a user's id, name, email and role to anyone. The instructor enrollment page calls it, so it probably needs a course staff rule rather than admin only.
assignment.py
get_assignment: returns full assignment details, including AI settings, to anyone with the id.get_extension,get_assignment_extensions: anyone can read extensions./courses
regrade_request.py
send_regrade_request,get_student_regrade_requests,check_regrade_request,delete_regrade_request
submission.py
test_autograder_submission: runs code in Docker, so this one matters most.
Suggested approach: same as #366. Use the helpers in util/auth.py, run auth before input checks, and add unit tests for 401, 403 and the success case.
- Lingua principale
- Python
- Stelle
- 13
- Fork
- 0
- Merge medio
- 2h 4m
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di kiat/codeAssist
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
kiat/codeAssist#391 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
kiat/codeAssist#364 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
kiat/codeAssist#393 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 63/100
kiat/codeAssist#392 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
kiat/codeAssist#390 ·
Tutte le issue di kiat/codeAssist
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
[Bug]: Importing weave changes the process-wide localeForse già presa @himanshu748 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
UX
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
mediajunkie/piper-morgan-product#2008 · 2 commenti ·