Interactive consent for a non-ASCII host is asked for and then always refused
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 72/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- go
研究方向
從 internal/authz/authz.go 中 Gate 的預設分支(約第 84-96 行)開始,那裡 confirm 在主機驗證之前執行。internal/authz/scope.go 中的 parseScopeHost 已經會拒絕非 ASCII 主機,請檢查它能否在提示之前執行。完成標準是:非 ASCII 主機在任何提示之前即被拒絕,並附帶 punycode 提示,且 internal/authz 中有測試涵蓋此情況。執行 go test ./internal/authz。
由索引模型根據 Issue 內容生成。
描述
Summary
For a running target with a non-ASCII host (for example http://bücher.example/), authz.Gate asks the operator to type the host to confirm. After they type it correctly, it refuses with an error about the scope "from the interactive confirmation" not being valid. The host check that makes the target unusable runs after the prompt instead of before it.
Where
internal/authz/authz.go:84-96(confirm, then the interactive scope built fromep.String(), thennormalize)internal/authz/scope.go:213-216(parseScopeHostrejects non-ASCII hosts)internal/authz/scope.go:290(endpointOfaccepts anyu.Hostname())
Details
default:
if err := confirm(ep, opts); err != nil {
return nil, err
}
g.source = sourceInteractive
raw = config.Scope{
Hosts: []string{ep.String()},
...
}
}
g.scope, g.hosts, g.prefixes, err = normalize(raw)
Impact
The operator is asked for consent, types the host exactly, and is then refused with an error about a scope they never wrote. The punycode hint in the error is useful, but it should come before the prompt.
Steps to reproduce
authz.Gate on http://bücher.example/ with Interactive: true and stdin bücher.example\n: it prints the confirmation prompt, then returns "the scope from the interactive confirmation is not valid ... write international names in punycode".
Suggested fix
In Gate, run parseScopeHost(ep.String()) before confirm, and refuse up front with the punycode hint. Converting the host to punycode would need golang.org/x/net/idna, a new dependency that AGENTS.md asks to justify.
Acceptance criteria
- A non-ASCII host is refused before any prompt, with the punycode hint.
- A test in
internal/authzcovers it.
Getting started
- Relevant files:
internal/authz/authz.go,internal/authz/scope.go - How to run tests:
go test ./internal/authz
Filed by repo-audit/full-audit at fffef43. Severity: low. Effort: S. audit-key: bug|internal/authz/authz.go|Gate
- 主要語言
- Go
- 星號
- 0
- 分支
- 1
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/Spackle 的其他 Issue
-
enhancement good first issue severity: low
難度 2/5 半天 新手友好度 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
難度 2/5 1-3 小時 新手友好度 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
難度 2/5 1-3 小時 新手友好度 78/100
TMHSDigital/Spackle#135 ·
-
bug good first issue severity: low
難度 2/5 1-3 小時 新手友好度 78/100
TMHSDigital/Spackle#129 ·
-
bug good first issue severity: low
難度 2/5 1-3 小時 新手友好度 82/100
TMHSDigital/Spackle#128 ·
查看 TMHSDigital/Spackle 的全部 Issue
相似的 Issue
-
bug raised-by:reviewer
難度 2/5 1-3 小時 新手友好度 66/100
medici-finance/assay#7655 ·
維護者通常 1 天內回覆
-
helm chart: make DaemonSet pod affinity configurable via values.yaml可能已有人在做 @Young-Zen 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
flannel-io/flannel#2632 ·
維護者通常 6 天內回覆
-
go-vulnerability security-scan
難度 1/5 1 小時以內 新手友好度 72/100
teslashibe/agent-go#36 ·
-
enhancement
難度 2/5 1-3 小時 新手友好度 72/100
nwverse/persona#15194 · 1 則留言 ·
維護者通常 1 天內回覆
-
bug flaky-test
難度 2/5 1-3 小時 新手友好度 78/100
rosskukulinski/tailworks#411 ·
維護者通常 1 天內回覆