Skip to content

fix: linear check for wildcards in output paths #408

Closed

Description

@uniqueg

Problem

The check for wildcards in output paths (pro_tes/ga4gh/tes/versions.py, new since v0.4.0) uses a regular expression whose running time grows quadratically with the length of the path on some inputs. It runs on the request thread for every new task, and outputs[].path has no length limit other than the size limit of request bodies. A long path can therefore block an API worker for longer than the Gunicorn timeout.

Found in the pre-release review of 0.5.0.

Fix

  • Replace the regular expression with a linear scan that finds the same wildcards.
  • Limit the size of paths in validate_task (4096 bytes, as PATH_MAX on Linux); longer ones get 400 Bad Request.
  • Add a regression test with a time bound.
  • Document the limit.

Activity

  1. added this to the v0.5.0 milestone on Nov 4, 2026
  2. added
    priority: high
    status: in progress
    type: bug
    type: security
    workload: hours
    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: highstatus: in progresstype: bugtype: securityworkload: hours

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions