Interactive consent for a non-ASCII host is asked for and then always refused
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- authorization, security
Direzione di ricerca
Inizia da internal/authz/authz.go nel ramo predefinito di Gate (intorno alle righe 84-96), dove confirm viene eseguito prima che l'host venga validato. internal/authz/scope.go contiene parseScopeHost, che già rifiuta host non ASCII; verifica se può essere eseguito prima del prompt. È completato quando un host non ASCII viene rifiutato prima di qualsiasi prompt con il suggerimento punycode e un test in internal/authz lo copre. Esegui go test ./internal/authz.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TMHSDigital/Spackle
-
enhancement good first issue severity: low
Difficoltà 2/5 Mezza giornata Idoneità per principianti 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/Spackle#135 ·
-
runs and runs compare print target text without the control-character cleaning the reports useApertabug good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/Spackle#129 ·
-
bug good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
TMHSDigital/Spackle#128 ·
Tutte le issue di TMHSDigital/Spackle
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Default exclude patterns drop production files whose names end in "test" or "spec" (Contest.java, Latest.swift, Aspec.hs)Forse già presa @alex09x l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
alibaba/open-code-review#2078 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docs needs-triage theme/supply-chain
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
podman-container-tools/container-libs#1393 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
limitlessprojects/Go-Hybrid#4764 ·
I maintainer di solito rispondono entro 1 giorno