Handle IPv6 literals without URL escaping too

Fixes #1547
This commit is contained in:
Cameron Gutman
2025-10-19 13:31:27 -05:00
parent 2550f416f4
commit 4688f3650c

View File

@@ -714,6 +714,10 @@ void ComputerManager::addNewHostManually(QString address)
// If there wasn't a port specified, use the default
addNewHost(NvAddress(url.host(), url.port(DEFAULT_HTTP_PORT)), false);
}
else if (QHostAddress(address).protocol() == QAbstractSocket::IPv6Protocol) {
// The user specified an IPv6 literal without URL escaping, so use the default port
addNewHost(NvAddress(address, DEFAULT_HTTP_PORT), false);
}
else {
emit computerAddCompleted(false, false);
}