Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

OAuth client scope handling breaks on comma-separated scope strings

未关闭 适合新手
#3,566 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python

调研方向

在 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 main and 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/python-sdk 的其他 Issue

查看 modelcontextprotocol/python-sdk 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。