bug(sdk/go): browser login callback binds 127.0.0.1 but redirect_uri uses localhost
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #4531 来自 @trukhinyuri —— 已关闭,未合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- go
调研方向
监听器位于 oidc/authcode.go(startCallbackServer 在 127.0.0.1 上调用 net.Listen),重定向 URI 则在 oidc/oidc.go 中构建(loginBrowser 使用 localhost)。请阅读这两处,然后决定是把重定向主机改为 127.0.0.1,还是让监听器同时覆盖两个回环地址族。当重定向 URI 中的主机与服务器接受的一致,并且 Login 流程在普通 IPv4 主机上仍能完成时,即为完成。该问题尚未复现,因此在视为已修复之前,请先确认 IPv6 的情况。
由索引模型根据 Issue 内容生成。
描述
User Story
I use OpenShell and build automation against its SDKs. I found this while reviewing sdk/ on main; it is identified from the code paths cited below and has not yet been reproduced against a live gateway.
Problem Statement
startCallbackServer listens on 127.0.0.1:<port>, but loginBrowser sends redirect_uri=http://localhost:<port>/callback. The CLI uses 127.0.0.1 for both.
Impact / Why This Matters
On hosts or browsers where localhost resolves to ::1 first without IPv4 fallback, the IdP redirect fails to reach the callback and Login times out.
Acceptance Criteria
- The redirect URI host matches the address the callback server listens on (or the server listens on both loopback families).
Reproduction Steps
Code reference: oidc/authcode.go net.Listen("tcp", "127.0.0.1:%d") vs oidc/oidc.go fmt.Sprintf("http://localhost:%d/callback", port). On a host where localhost maps only to ::1, run oidc.Login.
Suggested UX (if applicable)
No response
Environment
- OpenShell:
main@ 82977e2 (2026-10-13) - SDK: Go (
sdk/go/openshell/v1/oidc) - Toolchain: Go 1.25.4 linux/amd64, Node 22
Logs
- 主要语言
- Rust
- 星标
- 16.3k
- 派生
- 1.8k
- 平均合并
- 2 天 5 小时
- 30 天内合并 PR
- 402
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/OpenShell 的其他 Issue
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
bug(sdk/go): edge (Cloudflare Access) token is cached for the client lifetime and never reloaded未关闭state:triage-needed
难度 2/5 1-3 小时 新手友好度 72/100
NVIDIA/OpenShell#4515 · 1 条评论 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 72/100
NVIDIA/OpenShell#4509 · 1 条评论 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
docs(upgrade): no migration notes for 0.1.1, 0.1.2, or 0.1.3 (only the 0.1.0 page exists)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭state:triage-needed
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
area: compat area: parsing bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Volume eject does not refuse system, root or /home mounts可能已有人在做 @bernardopg 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
spacedriveapp/spacedrive#3159 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100