Skip to content

Channel language_exists and languages actions skip the channel permission check #6399

Description

@rtibbles

🙂 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 Change

Acceptance Criteria

General

  • A logged-in user who can't view a channel gets 404 from both GET /api/channel/<id>/languages and GET /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.

Activity

  1. added theissue type on Nov 15, 2026
  2. added
    good first issue
    help wanted
    on Nov 15, 2026
  3. learning-equality-bot commented on Nov 15, 2026

    @learning-equality-bot
    Contributor

    Hi! 👋

    This issue is available for contribution and supports self-assignment. Here's how to get started:

    • Comment /assign to assign yourself to this issue
    • You can have up to 2 issues assigned at a time across all community repos
    • Dropping an issue has a 7-day cooldown before the slot opens up
    • Link your pull request to this issue when you submit it

    📖 Read the Contributing guidelines before starting.

    Are you preparing for Google Summer of Code? See our GSoC guidelines.

  4. adibmbrk commented on Nov 17, 2026

    @adibmbrk
    Contributor

    /assign

  5. learning-equality-bot commented on Nov 17, 2026

    @learning-equality-bot
    Contributor

    Hi! 👋

    You can't be assigned to this issue right now because you've reached the 2-issue limit.

    Your current assignments:

    Once a slot opens up, come back and comment /assign again. 😊

    Are you preparing for Google Summer of Code? See our GSoC guidelines.

  6. adibmbrk commented on Nov 17, 2026

    @adibmbrk
    Contributor

    Hi @rtibbles @AlexVelezLl , Can you unassign me from this issue learningequality/kolibri#15853 (comment) and assign me to this issue, as that issue is being worked on by someone else. Thanks

  7. learning-equality-bot commented on Nov 17, 2026

    @learning-equality-bot
    Contributor

    Hi! 👋

    Thanks for your interest! This issue supports self-assignment. Comment /assign to assign yourself.

    Visit Contributing guidelines to learn about the contributing process. 😊

    Are you preparing for Google Summer of Code? See our GSoC guidelines.

  8. AlexVelezLl commented on Nov 17, 2026

    @AlexVelezLl
    Member

    Thanks for letting us know, @adibmbrk. Assigned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DEV: backendcommunity-contribution-in-progressgood first issuehelp wanted

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions