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

bug(sdk/go): browser login callback binds 127.0.0.1 but redirect_uri uses localhost

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

维护者通常 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 内容生成。

描述

state:triage-needed
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

环境准备

从这里开始

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

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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