Logout accepts GET requests
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 67/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- django, javascript, python
- Domínio
- authentication, backend-api-design, security
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 212
- Forks
- 321
- Merge médio
- 1d 7h
- PRs com merge (30d)
- 14
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de learningequality/studio
-
Community library status changes don't update `date_updated`Talvez já em andamento @ArpitaSamanta10 assumiu hoje. Abertacommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
learningequality/studio#6414 · 8 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
DEV: backend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
learningequality/studio#6410 ·
Mantenedores costumam responder em até 1 dia
-
DEV: backend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
learningequality/studio#6409 ·
Mantenedores costumam responder em até 1 dia
-
DEV: backend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
learningequality/studio#6407 ·
Mantenedores costumam responder em até 1 dia
-
Stripe webhook accepts events when no webhook secret is configuredTalvez já em andamento @adibmbrk assumiu hoje. Abertacommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
learningequality/studio#6404 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de learningequality/studio
Issues semelhantes
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 76/100
samuelclay/NewsBlur#2214 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
MODEL_NOT_FOUND gives no suggestion for a model listed only as model:profileTalvez já em andamento @ShaiShmuel assumiu hoje. Abertaenhancement rust
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
superlinked/sie#985 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
readthedocs/readthedocs-builder#73 ·
Mantenedores costumam responder em até 1 dia