Skip to content

🐛 [BUG] Server: path matching too broad + query param parsing issues #228

Closed

Description

@ajianaz

Description

Three related server routing/parsing issues:

1. DELETE /forget matches too broadly (line 272)

path.starts_with("/forget") means DELETE requests to /forgetful, /forget-me-now also match. Should use exact match.

2. Query param split truncates values with '=' (line 277)

pair.split('=') splits on every '=', so tag=foo=bar loses the middle =. Should use splitn(2, '=').

3. --host/--port missing value is silent (line 383+)

If --host is the last arg without a value, the code silently skips it. Should print error and exit.

Affected Code

  • crates/uteke-server/src/main.rs lines 272, 277, 383+

Fix

  1. Use path == "/forget" || path.starts_with("/forget?")
  2. Replace split('=') with splitn(2, '=')
  3. Add bounds check with error message for missing values

Found by Cora v0.4.4 scan.

Activity

  1. added
    bug
    scope:core
    cora-scan
    on Jun 7, 2026
  2. ajianaz commented on Jun 7, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in v0.0.11 (PR #234)

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

    bugcora-scanpriority:mediumscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions