Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

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

未關閉 適合新手
#4,518 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
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
星號
15.4k
分支
1.7k
平均合併
2 天 3 小時
30 天內合併 PR
374

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。