Skip to content

fix(configuration): port 0 treated as falsy in getvalidport validation #8500

@lukebaze

Description

@lukebaze

Description

The condition if (port) treats port 0 as falsy, causing it to bypass port validation and call getFreePort() instead. Port 0 is a valid network port (meaning 'any available port'), but this logic incorrectly treats it as 'no port specified'. Users explicitly configuring port 0 will get unexpected behavior.

Severity: medium
File: src/configuration/utils.ts

Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    STATE: Need responseAn issue that requires a response or attention from the team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions