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 天内回复