`PartialEq`/`Ord` impls for `Authority` ignores case of userinfo part
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- networking
Direzione di ricerca
Inizia dalle implementazioni di PartialEq e Ord di http::uri::Authority, quindi riproduci il problema con il test userinfo_eq_case_sensitive mostrato nella segnalazione. Verifica come vengono analizzati e confrontati i componenti di Authority. Il lavoro è completo quando il comportamento del confronto corrisponde alla distinzione dell’RFC per userinfo, oppure quando il comportamento intenzionale è documentato chiaramente e sono presenti test di regressione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The comparison traits are implemented for http::uri::Authority by case-insensitively comparing the underlying authority string. This works fine if the authority component only consists of the host subcomponent (and optionally the port subcomponent), which is case-insensitive according to RFC 3986 Section 6.2.2.1.
However, the authority component may also contain a (deprecated according to [RFC 9110 Section 4.2.4.]) userinfo subcomponent, which is not specified to be case-insensitive and thus should be compared case-sensitively. In particular, the following test should pass:
use http::uri::Authority;
#[test]
fn userinfo_eq_case_sensitive() {
assert_ne!(
Authority::from_static("alice:supersecurepassword@example.com"),
Authority::from_static("Alice:SuperSecurePassword@example.com")
);
}
But this fails with the current implementation.
Is the behavior intentional? I understand that complicating the implementation for the deprecated subcomponent might not be desirable. But I think this should at least be documented if it's intentional.
[RFC 9110 Section 4.2.4.]: https://datatracker.ietf.org/doc/html/rfc9110#section-4.2.4
- Lingua principale
- Rust
- Stelle
- 1.4k
- Fork
- 378
- Merge medio
- 1g 21h
- PR unite (30g)
- 5
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 58/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
Tutte le issue di hyperium/http
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rocky-data/rocky#2181 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Apertabot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
midnightntwrk/midnight-indexer#1557 ·