Logout accepts GET requests
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 67/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- django, javascript, python
- Domaine
- authentication, backend-api-design, security
Piste de recherche
Read contentcuration/contentcuration/views/users.py and the logout action in contentcuration/contentcuration/frontend/shared/vuex/session/index.js; the issue gives the relevant entry points and expected behavior. Update backend and frontend tests to cover GET, POST with and without a CSRF token, direct logout() callers, and the sign-out flows. Done means GET is rejected, valid POST logs out, missing CSRF is rejected, and both app sign-out controls still work.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Overview
/accounts/logout/ logs the user out on a GET request, which Django's CSRF protection doesn't check. Any page a Studio user visits can sign them out by loading that URL, for example as an image.
Complexity: Low
Target branch: hotfixes
Context
- The
logoutview, routed ataccounts/logout/, accepts any method. - The frontend
logoutaction calls it withclient.getin both of its branches. - Reproduced:
GET /en/accounts/logout/returns 200 and ends the session.
The Change
logoutshould accept only POST, with Django's CSRF check, and the frontend should call it with POST.
Acceptance Criteria
General
-
GET /en/accounts/logout/returns 405 and the session stays active. -
POST /en/accounts/logout/with a valid CSRF token ends the session, and without one returns 403. -
DeleteAccountViewandnew_user_redirect, which calllogout()directly, still end the session as before. - "Sign out" in the app bar and the navigation drawer still signs the user out, including after confirming the unsaved-changes prompt.
Testing
- Backend tests cover GET, POST with a CSRF token and POST without one.
- A frontend test asserts the
logoutaction sends a POST.
AI usage
I chose which audit findings belong in #6398 and set the access pattern. Claude Code found and reproduced this gap and drafted this issue.
- Langage dominant
- Python
- Étoiles
- 212
- Forks
- 321
- Merge moyen
- 1 j 7 h
- PR mergées (30 j)
- 14
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de learningequality/studio
-
Community library status changes don't update `date_updated`Peut-être pris @LightCreator1007 l’a pris il y a 1 jour. OuverteDEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
learningequality/studio#6414 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
learningequality/studio#6410 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
learningequality/studio#6409 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6407 ·
Les mainteneurs répondent en général sous 1 jour
-
DEV: backend good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
learningequality/studio#6404 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de learningequality/studio
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
canonical/paas-charm#407 · 1 commentaire ·
Les mainteneurs répondent en général sous 5 jours
-
bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
FAIRmat-NFDI/pynxtools-spm#136 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement tooling
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
`read_nexus` entry point points to a function that no longer existsPeut-être pris @RubelMozumder l’a pris aujourd’hui. Ouverteannotator bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
FAIRmat-NFDI/pynxtools#876 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retryingPeut-être pris @yipinghuang1991 l’a pris aujourd’hui. Ouvertecomp/agent P2 type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
NousResearch/hermes-agent#156837 ·
Les mainteneurs répondent en général sous 1 jour