Skip to content

Service URLs with surrounding spaces are stored #356

Closed

Description

@uniqueg

Problem

A service url with leading or trailing spaces passes validation and is stored as written: normalize_url() and check_url_scheme() in cloud_registry/ga4gh/registry/service.py strip spaces only for their checks. Links (documentationUrl, organization.url, contactUrl) with such spaces are rejected.

With FOCA 0.21's response validation, one stored value like this would fail a whole list (GET /services, GET /verifications), not only the entry itself.

Proposed fix

Reject such values with 400 Bad Request, as for links and as the ExternalServiceRegister schema already describes (URLs "without ... whitespace"), and remove the strip branches. The database gets wiped for rc2, so no stored data needs migrating, and this should land before rc2 data accumulates.

Done when

  • POST and PUT /services and PUT verifications with such a URL return 400
  • The tolerance is gone from the code and from docs/api.md, and the release notes of rc2 mention the change
  • Coverage stays at 100%

Activity

  1. added this to the v1.0.0-rc2 milestone on Nov 4, 2026
  2. added
    priority: high
    status: in progress
    type: bug
    workload: minutes
    on Nov 4, 2026
  3. removed
    status: in progress
    on Nov 4, 2026
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

    priority: hightype: bugworkload: minutes

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions