Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

More routes with no authentication check

Aperta
#379 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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: takes user_id from the request body, so anyone with an entry code can enroll any user.
  • leave_course: takes user_id from 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di kiat/codeAssist

Tutte le issue di kiat/codeAssist

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.