Summary
MOSHPIT_PROXY_PORT and MOSHPIT_GATEWAY_PORT are parsed with parseInt and only checked for a positive finite result. This accepts partial or invalid port strings such as 443junk and also accepts values above the maximum TCP port.
Reproduction
- MOSHPIT_PROXY_PORT=443junk is silently interpreted as port 443.
- MOSHPIT_GATEWAY_PORT=70000 survives configuration and later fails when a socket is opened.
- Fractional values such as 1.5 are truncated instead of rejected.
Expected behavior
Only complete decimal integers in the TCP port range 1 through 65535 should be accepted. Invalid values should use the documented defaults.
Reactions are currently unavailable
Summary
MOSHPIT_PROXY_PORT and MOSHPIT_GATEWAY_PORT are parsed with parseInt and only checked for a positive finite result. This accepts partial or invalid port strings such as 443junk and also accepts values above the maximum TCP port.
Reproduction
Expected behavior
Only complete decimal integers in the TCP port range 1 through 65535 should be accepted. Invalid values should use the documented defaults.