Skip to content

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

Closed

Description

@drevendev

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions