Node details endpoint returns nodes outside public channels
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 1/100
Research direction
Read get_node_details and get_channel_details in contentcuration/contentcuration/views/nodes.py, then inspect the ContentNode.filter_view_queryset approach referenced in #6398. Add regression tests for each acceptance criterion, including anonymous and logged-in access, and check that out-of-scope and nonexistent ids return 404 while public nodes retain their current details. The issue explicitly says it is not open for contribution.
Written by the indexing model from the issue text.
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
/api/get_node_details/<node_id> needs no login, and refuses a node only when it belongs to an existing channel that isn't public. Nodes in a user's clipboard, orphaned nodes and nodes in deleted public channels all return their full details. A node id that doesn't exist raises DoesNotExist and returns 500 (#5784). The sibling get_channel_details looks channels up through Channel.filter_view_queryset.
Complexity: Low
Target branch: hotfixes
Context
get_node_detailsusesContentNode.objects.getand checks onlychannel and not channel.public.get_channel_detailsusesget_object_or_404on the view queryset.- Reproduced, anonymously: 200 with full details for a node in a user's clipboard tree, for an orphaned node, and for a node in a deleted public channel.
get_channel_detailsreturns 404 for that deleted channel.
The Change
get_node_detailsshould look the node up throughContentNode.filter_view_queryset, following the strategy in #6398, and return 404 for anything outside it, including ids that don't exist.
Acceptance Criteria
General
- Each reproduced case in Context returns 404.
- A nonexistent node id returns 404.
- Nodes in public channels return the same details as before.
- A logged-in user gets details for nodes in non-public channels they can view, as
get_channel_detailsalready allows for those channels.
Testing
- Regression tests cover each criterion.
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.
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 327
- Avg merge
- 17h 5m
- Merged PRs (30d)
- 25
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from learningequality/studio
-
Community library status changes don't update `date_updated`Possibly taken @ArpitaSamanta10 claimed this 14 days ago. Opencommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
learningequality/studio#6414 · 8 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Activation key can activate a different account whose email differs only in casePossibly taken @Madhu-priya123 claimed this 5 days ago. OpenDEV: backend
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
learningequality/studio#6410 · 2 comments ·
Maintainers usually reply within 1 day
-
DEV: backend
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
learningequality/studio#6409 ·
Maintainers usually reply within 1 day
-
DEV: backend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
learningequality/studio#6407 ·
Maintainers usually reply within 1 day
-
Stripe webhook accepts events when no webhook secret is configuredPossibly taken @adibmbrk claimed this 14 days ago. Opencommunity-contribution-in-progress DEV: backend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
learningequality/studio#6404 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in learningequality/studio
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
babalae/bettergi-scripts-list#3905 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Open
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
dedicatedcode/reitti#1445 ·
Maintainers usually reply within 1 day
-
New tool: Uncle DeskPossibly taken @github-actions claimed this today. Opensubmission triage
Difficulty 1/5 Under an hour Newbie friendliness 85/100
kausalflow/tools#384 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
area: css
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day