OAuth client scope handling breaks on comma-separated scope strings
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
- 领域
- api, authentication, backend
调研方向
在 OAuth 客户端代码中查找 union_scopes 函数和 offline_access 成员资格检查。修复涉及创建一个 parse_scopes 辅助函数,该函数可按空格和逗号进行分割。查看现有的范围处理测试以了解预期行为,然后为新辅助函数编写参数化测试。PR 描述中提到修复已在 fork 中准备就绪,因此请将该实现作为参考进行审查。
由索引模型根据 Issue 内容生成。
描述
Initial Checks
- I confirm that I'm using the newest release of my line (verified on
mainand 2.2.0) - I confirm that I searched for my issue in the issues before opening this one (searched "comma scope", "scope separator")
Release line
v2 (v1 shares the code)
Description
RFC 6749 §3.3 separates scopes with spaces, but real-world authorization servers (e.g. Linear) return comma-separated scope values in token responses and WWW-Authenticate challenges. union_scopes and the offline_access membership checks split on whitespace only, so a comma-separated grant is treated as one opaque scope: the SEP-2350 step-up union stops deduplicating (scopes accumulate as read,write read write) and offline_access/prompt=consent handling misfires.
We carry a fix in Perplexity's fork and have it rebased onto current main: a parse_scopes helper accepting both separators, used in union_scopes and the offline_access membership checks, with parametrized tests. Please assign so the PR stays open.
🤖 Generated with Claude Code
- 主要语言
- Python
- 星标
- 24.3k
- 派生
- 4k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 30
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
modelcontextprotocol/python-sdk 的其他 Issue
-
v1 v2
难度 2/5 1-3 小时 新手友好度 85/100
modelcontextprotocol/python-sdk#3546 · 5 条评论 ·
-
v1 v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/python-sdk#3545 · 1 条评论 ·
-
v1 v2
难度 1/5 1 小时以内 新手友好度 91/100
modelcontextprotocol/python-sdk#3508 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 64/100
modelcontextprotocol/python-sdk#3504 ·
-
v1 v2
难度 2/5 1-3 小时 新手友好度 82/100
modelcontextprotocol/python-sdk#3492 · 1 条评论 ·
查看 modelcontextprotocol/python-sdk 的全部 Issue
相似的 Issue
-
essnmx good first issue
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 2/5 1-3 小时 新手友好度 65/100
syfoud/Simulated_Scepter#174 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Giskard-AI/giskard-oss#2840 · 1 条评论 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success 未关闭area: repo bug perceived difficulty: 2
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
yeti-platform/yeti#1380 ·