`Uri` does not accept percent-encoded characters in hostname
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- rust
- Ambito
- networking
Direzione di ricerca
Inizia da src/uri/authority.rs, in uri::authority::validate_authority_bytes e nei punti di ingresso Authority::from_static/from_maybe_shared. Confronta la validazione con la sezione 3.2.2 di RFC3986 e con la gestione esistente di userinfo e degli identificatori di zona IPv6 descritta nell’issue. Il lavoro è completato quando il comportamento previsto per i caratteri dell’host codificati con percent-encoding è stabilito e coperto dai test pertinenti di parsing dell’authority.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
uri::authority::validate_authority_bytes (and thus Authority::from_static/from_maybe_shared) returns Err(AuthorityError::InvalidAuthority) for host names with percent-encoded characters.
I'm not sure if this is intentional, as percent-encoding is explicitly allowed for the userinfo part of the authority in the parsing logic, with this comment referencing RFC3986 (and specifically mentioning that % shouldn't be allowed in a host name):
// Per https://tools.ietf.org/html/rfc3986#section-3.2.1 and
// https://url.spec.whatwg.org/#authority-state
// the userinfo can have a percent-encoded username and password,
// so record that a `%` was found. If this turns out to be
// part of the userinfo, this flag will be cleared.
// Also per https://tools.ietf.org/html/rfc6874, percent-encoding can
// be used to indicate a zone identifier.
// If the flag hasn't been cleared at the end, that means this
// was part of the host name (and not part of an IPv6 address), and
// will fail with an error.
However, RFC3986 section 3.2.2 defines the host part of the authority as
host = IP-literal / IPv4address / reg-name
with reg-name being defined a few paragraphs later as
reg-name = *( unreserved / pct-encoded / sub-delims )
https://url.spec.whatwg.org/#host-parsing also agrees that the host can contain percent-encoded characters. So, from my understanding percent-encoded characters in a host name should be allowed.
- Lingua principale
- Rust
- Stelle
- 1.4k
- Fork
- 380
- Merge medio
- 2g 5h
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 hyperium/http
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
Tutte le issue di hyperium/http
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
HigherOrderCO/Bend#1294 ·
-
chore P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
todo:ticket
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
docs: CLAUDE.md version banner shows 1.4.0 instead of 1.5.0 (recurring drift, root cause unresolved)Apertaawaiting-response backend bug documentation enhancement P2 platform/linux qa safety
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
wildcard/caro#1520 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Liquid glass draws square corners on undecorated windows (cornerRadius without clipsToBounds)Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
tauri-apps/window-vibrancy#230 ·