mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-10-29 01:56:31 +00:00
With the API server field empty, get_api_server_ builds the URL from the ID server as "http://{host}:21114". For an ID server entered as a bare IPv6 address such as 2001:db8::1, which test_if_valid_server accepts, increase_port leaves it unchanged and the result is http://2001:db8::1:21114. That does not parse as a URL (InvalidPort), so login and every other API request fail. Wrap the address in brackets in that branch only. Hostnames, IPv4 and "[addr]:port" take the same path as before.