Channel `language_exists` and `languages` actions skip the channel permission check
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 82/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Domínio
- api, authorization, backend
Direção de pesquisa
Comece pelas actions channel_language_exists e get_languages_in_channel em contentcuration/contentcuration/viewsets/channel.py e, em seguida, compare como as outras actions de detalhe usam get_object(). Atualize ambas as actions para aplicar a mesma verificação de acesso ao channel. Adicione testes de regressão para um não membro, um viewer e um ID de channel inexistente; a tarefa estará concluída quando ambas as actions retornarem 404 para channels inacessíveis e preservarem as respostas para viewers e editores.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.
Overview
The channel language_exists and languages actions load the channel through Channel.objects rather than get_object(). Any logged-in user can read the content languages of a private channel they can't view, given its id, and the response also shows whether that channel id exists. The other detail actions on the viewset use get_object().
Complexity: Low
Target branch: hotfixes
Context
- The
channel_language_existsandget_languages_in_channelactions use helpers that queryChannel.objectsdirectly. - Reproduced: a logged-in user with no access to a private channel gets 200 with its languages from
GET /api/channel/<id>/languages. The same user gets 404 fromGET /api/channel/<id>.
The Change
- Both actions should load the channel through
get_object(), following the strategy in #6398, so a user who can't view the channel gets the same 404 asGET /api/channel/<id>.
Acceptance Criteria
General
- A logged-in user who can't view a channel gets 404 from both
GET /api/channel/<id>/languagesandGET /api/channel/<id>/language_exists, the same as for a nonexistent channel id. - Editors and viewers of the channel get the same responses as before.
Testing
- Regression tests cover a non-member, a viewer and a nonexistent id for both actions.
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 @LightCreator1007 assumiu há 1 dia. AbertaDEV: backend good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
learningequality/studio#6414 · 3 comentários ·
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
-
DEV: backend good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
learningequality/studio#6404 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de learningequality/studio
Issues semelhantes
-
[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 retryingTalvez já em andamento @yipinghuang1991 assumiu hoje. Abertacomp/agent P2 type/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
NousResearch/hermes-agent#156837 ·
Mantenedores costumam responder em até 1 dia
-
Bug: Missing continue on ValueError in CpanBackend.check_feed causes UnboundLocalError or duplicate yieldsTalvez já em andamento @muskan-creates352 assumiu hoje. Aberta
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 86/100
fedora-infra/anitya#2188 ·
Mantenedores costumam responder em até 1 dia
-
docs documentation need-triage SaaS
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
integration:hermes
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
vectorize-io/hindsight#6601 ·
Mantenedores costumam responder em até 1 dia
-
triage:product type:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
dbt-labs/dbt-adapters#2333 ·
Mantenedores costumam responder em até 1 dia