Bug: curated starter accepts an empty URL fragment despite its no-fragments contract

Chiusa
#27 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #37 di @drevendev — integrata

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Review examples/curated-starter/curate.py and the existing candidate fix in beautifulrepo/workshop-hardening-20261018; this issue says that work is already underway. Check the regression cases for /#, /path#, /#section, and /%23, then run the repository checks. Done means the empty literal fragment is rejected while %23 remains accepted and the listed URL behaviors are preserved.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Reproduced on the public product

Review: 2026-10-19; master c2cbcf07ae67263ec7dbeb7cfb5822ea65b49c38.
examples/curated-starter/curate.py, blob 32cdddb2b79696ee2bb75dfa37ca7105292ef22a.

checked_url() accepts https://example.org/# and https://example.org/path#. A trailing literal # introduces an empty fragment, but parts.fragment is the empty string, so the current truthiness check misses it. The curated starter explicitly intends to reject fragment-bearing URLs.

Priority and existing work

P2 contract regression. A candidate fix already exists in beautifulrepo/workshop-hardening-20261018; review that work instead of creating another implementation. It has not reached the reviewed master.

Acceptance

  • Reject a literal fragment delimiter even when the fragment text is empty.
  • Continue accepting the encoded character %23 within an otherwise valid path/query.
  • Add regression cases for /#, /path#, /#section and /%23.
  • Preserve original no-credentials, URL encoding and deterministic-output behavior.
  • Run current full repository checks before integration.

This is deliberately separate from #26: the core catalog and curated starter have different fragment policies. Do not apply a global fragment ban to the core catalog merely to unify implementations.

Lingua principale
Python
Stelle
2
Fork
0
Merge medio
3h 40m
PR unite (30g)
174

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di drevendev/BeautifulRepo

Tutte le issue di drevendev/BeautifulRepo

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.