Channel `language_exists` and `languages` actions skip the channel permission check
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- api, authorization, backend
Línea de trabajo
Empieza con las acciones channel_language_exists y get_languages_in_channel en contentcuration/contentcuration/viewsets/channel.py y luego compara cómo usan get_object() las otras acciones de detalle. Actualiza ambas acciones para que apliquen la misma comprobación de acceso al canal. Añade pruebas de regresión para un usuario que no sea miembro, un viewer y un ID de canal inexistente; el trabajo estará terminado cuando ambas acciones devuelvan 404 para los canales inaccesibles y mantengan las respuestas para viewers y editores.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🙂 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.
- Lenguaje dominante
- Python
- Estrellas
- 212
- Forks
- 321
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de learningequality/studio
-
Community library status changes don't update `date_updated`Posiblemente ocupada @LightCreator1007 la tomó hace 1 día. AbiertoDEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
learningequality/studio#6414 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
learningequality/studio#6410 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
learningequality/studio#6409 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6407 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6404 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de learningequality/studio
Issues similares
-
[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 retryingPosiblemente ocupada @yipinghuang1991 la tomó hoy. Abiertocomp/agent P2 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NousResearch/hermes-agent#156837 ·
Los mantenedores suelen responder en 1 día
-
Bug: Missing continue on ValueError in CpanBackend.check_feed causes UnboundLocalError or duplicate yieldsPosiblemente ocupada @muskan-creates352 la tomó hoy. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
fedora-infra/anitya#2188 ·
Los mantenedores suelen responder en 1 día
-
docs documentation need-triage SaaS
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
integration:hermes
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
vectorize-io/hindsight#6601 ·
Los mantenedores suelen responder en 1 día
-
triage:product type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
dbt-labs/dbt-adapters#2333 ·
Los mantenedores suelen responder en 1 día