Node details endpoint returns nodes outside public channels
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 1/100
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
❌ 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.
- 主要语言
- Python
- 星标
- 212
- 派生
- 321
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 14
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
learningequality/studio 的其他 Issue
-
Community library status changes don't update `date_updated`可能已有人在做 @LightCreator1007 于 1 天前认领。 未关闭DEV: backend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
learningequality/studio#6414 · 3 条评论 ·
维护者通常 1 天内回复
-
DEV: backend
难度 2/5 1-3 小时 新手友好度 82/100
learningequality/studio#6410 ·
维护者通常 1 天内回复
-
DEV: backend
难度 2/5 1-3 小时 新手友好度 76/100
learningequality/studio#6409 ·
维护者通常 1 天内回复
-
DEV: backend
难度 2/5 1-3 小时 新手友好度 78/100
learningequality/studio#6407 ·
维护者通常 1 天内回复
-
DEV: backend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
learningequality/studio#6404 · 1 条评论 ·
维护者通常 1 天内回复
查看 learningequality/studio 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 77/100
canonical/paas-charm#407 · 1 条评论 ·
维护者通常 5 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
FAIRmat-NFDI/pynxtools-spm#136 ·
维护者通常 1 天内回复
-
enhancement tooling
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
`read_nexus` entry point points to a function that no longer exists可能已有人在做 @RubelMozumder 今天认领。 未关闭annotator bug
难度 1/5 1 小时以内 新手友好度 88/100
FAIRmat-NFDI/pynxtools#876 · 1 条评论 ·
维护者通常 1 天内回复
-
[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 retrying可能已有人在做 @yipinghuang1991 今天认领。 未关闭comp/agent P2 type/bug
难度 2/5 1-3 小时 新手友好度 82/100
NousResearch/hermes-agent#156837 ·
维护者通常 1 天内回复