Skip to content

[BUG] Server Host Configuration Not Validated #184

@EnthusiasticTech

Description

@EnthusiasticTech

Project

vgrep

Description

In config.rs, server_host accepts any string without validation. Users can set invalid hostnames, IPs with ports embedded, URLs, or malformed addresses that will fail at runtime.

Error Message

Debug Logs

System Information

Bounty Version: 0.1.0
OS: Ubuntu 24.04 LTS
CPU: AMD EPYC-Genoa Processor (8 cores)
RAM: 15 GB

Screenshots

No response

Steps to Reproduce

  1. Run vgrep config set server-host "http://localhost:8080"
  2. Or vgrep config set server-host "not a valid host!!!"
  3. Run vgrep serve
  4. Server fails with confusing error message

Expected Behavior

Configuration validates hostname/IP format and rejects invalid values

Actual Behavior

Any string accepted, runtime failure with unclear error

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingideIssues related to IDEinvalidThis doesn't seem rightvgrep

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions