Channel `language_exists` and `languages` actions skip the channel permission check
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- api, authorization, backend
Direzione di ricerca
Inizia con le azioni channel_language_exists e get_languages_in_channel in contentcuration/contentcuration/viewsets/channel.py, poi confronta come le altre azioni di dettaglio usano get_object(). Aggiorna entrambe le azioni affinché applichino lo stesso controllo di accesso al channel. Aggiungi test di regressione per un non membro, un viewer e un ID di channel inesistente; il lavoro è completato quando entrambe le azioni restituiscono 404 per i channel non accessibili e mantengono le risposte per viewer ed editor.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🙂 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.
- Lingua principale
- Python
- Stelle
- 212
- Fork
- 321
- Merge medio
- 1g 7h
- PR unite (30g)
- 14
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di learningequality/studio
-
Community library status changes don't update `date_updated`Forse già presa @LightCreator1007 l’ha presa 1 giorno fa. ApertaDEV: backend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
learningequality/studio#6414 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
DEV: backend
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
learningequality/studio#6410 ·
I maintainer di solito rispondono entro 1 giorno
-
DEV: backend
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
learningequality/studio#6409 ·
I maintainer di solito rispondono entro 1 giorno
-
DEV: backend
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
learningequality/studio#6407 ·
I maintainer di solito rispondono entro 1 giorno
-
DEV: backend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
learningequality/studio#6404 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di learningequality/studio
Issue simili
-
[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 retryingForse già presa @yipinghuang1991 l’ha presa oggi. Apertacomp/agent P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NousResearch/hermes-agent#156837 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug: Missing continue on ValueError in CpanBackend.check_feed causes UnboundLocalError or duplicate yieldsForse già presa @muskan-creates352 l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
fedora-infra/anitya#2188 ·
I maintainer di solito rispondono entro 1 giorno
-
docs documentation need-triage SaaS
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
integration:hermes
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
vectorize-io/hindsight#6601 ·
I maintainer di solito rispondono entro 1 giorno
-
triage:product type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
dbt-labs/dbt-adapters#2333 ·
I maintainer di solito rispondono entro 1 giorno