The first path segment is unexpectedly interpreted as an authority after normalization
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- backend-api-design
Direzione di ricerca
Inizia dal punto di ingresso uri_reference() e segui normalize(), resolve_with() e unsplit() usando gli esempi nell’issue e le regole della RFC 3986 a cui fanno riferimento. Determina come devono essere gestiti i doppi slash iniziali quando non è presente alcuna authority, inclusa l’interazione rilevata con l’issue #84. Il lavoro è completo quando il comportamento previsto è specificato e gli esempi non reinterpretano più il primo segmento del percorso come una authority.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
scheme:/..///barhas scheme="scheme", authority=None, path=/..///bar.
However, after normalization, it has scheme="scheme", authority="bar".- Consider t1 as an IRI
..///barresolved againstscheme:.
t1 should have scheme="scheme"and authority=None(since..///bardoes not contain authority).
However, resulting string isscheme://bar, it has authority=bar.
And some more examples:
$ python
Python 3.9.9 (main, Jan 10 2022, 18:52:39)
[GCC 11.2.1 20211127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from rfc3986 import uri_reference
>>> b = uri_reference('scheme:')
>>> r1 = uri_reference('..///bar')
>>> t1 = r1.resolve_with(b)
>>> t1
URIReference(scheme='scheme', authority=None, path='//bar', query=None, fragment=None)
>>> t1.unsplit()
'scheme://bar'
>>> r2 = uri_reference('/..///bar')
>>> r2.resolve_with(b)
URIReference(scheme='scheme', authority=None, path='//bar', query=None, fragment=None)
>>> uri_reference('scheme:/..///bar').normalize()
URIReference(scheme='scheme', authority=None, path='//bar', query=None, fragment=None)
>>> uri_reference('scheme:/..///bar').normalize().unsplit()
'scheme://bar'
I'm not sure how this should handled.
Collapsing the // at the beginning is not explicitly allowed by RFC 3986, so I think the normalization and the resolution cannot produce valid output and should fail in this case.
(But RFC 3986 does not seem to state that they can fail!)
This can caused by normalization during resolution, so #84 may also be affected by this issue.
- Lingua principale
- Python
- Stelle
- 189
- Fork
- 38
- Merge medio
- 13h 36m
- PR unite (30g)
- 1
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 python-hyper/rfc3986
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
python-hyper/rfc3986#138 · 1 commento ·
-
sdist is missing `tox.ini` Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
python-hyper/rfc3986#129 ·
-
wrong parse Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
python-hyper/rfc3986#128 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
python-hyper/rfc3986#123 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
python-hyper/rfc3986#122 · 3 commenti · 1 reazione ·
Tutte le issue di python-hyper/rfc3986
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
zostera/django-bootstrap4#894 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
use-agent-os/agent-os#3276 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#117848 ·