Interactive consent for a non-ASCII host is asked for and then always refused
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 72/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- go
- Bereich
- authorization, security
Rechercherichtung
Beginne in internal/authz/authz.go beim Standardzweig von Gate (etwa Zeilen 84-96), wo confirm läuft, bevor der Host validiert wird. internal/authz/scope.go enthält parseScopeHost, das nicht-ASCII-Hosts bereits ablehnt; prüfe, ob es vor der Abfrage ausgeführt werden kann. Fertig ist, wenn ein nicht-ASCII-Host vor jeder Abfrage mit dem Punycode-Hinweis abgelehnt wird und ein Test in internal/authz dies abdeckt. Führe go test ./internal/authz aus.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Go
- Sterne
- 0
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TMHSDigital/Spackle
-
enhancement good first issue severity: low
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
TMHSDigital/Spackle#135 ·
-
runs and runs compare print target text without the control-character cleaning the reports useOffenbug good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
TMHSDigital/Spackle#129 ·
-
bug good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
TMHSDigital/Spackle#128 ·
Alle Issues in TMHSDigital/Spackle
Ähnliche Issues
-
bug raised-by:reviewer
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
medici-finance/assay#7655 ·
Maintainer antworten meist innerhalb von 1 Tag
-
helm chart: make DaemonSet pod affinity configurable via values.yamlEvtl. vergeben @Young-Zen hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
flannel-io/flannel#2632 ·
Maintainer antworten meist innerhalb von 6 Tagen
-
go-vulnerability security-scan
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
teslashibe/agent-go#36 ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
nwverse/persona#15194 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug flaky-test
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
rosskukulinski/tailworks#411 ·
Maintainer antworten meist innerhalb von 1 Tag