From 5e6b60bae054fdac8b4835af0a5a99f222f37981 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 18 Mar 2023 14:47:23 -0500 Subject: [PATCH] Fix handling of IPv6 literals with port numbers --- app/backend/computermanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/backend/computermanager.cpp b/app/backend/computermanager.cpp index 535a86f5..9c519d87 100644 --- a/app/backend/computermanager.cpp +++ b/app/backend/computermanager.cpp @@ -658,8 +658,8 @@ void ComputerManager::stopPollingAsync() void ComputerManager::addNewHostManually(QString address) { - QUrl url = QUrl::fromUserInput(address); - if (url.isValid() && !url.host().isEmpty()) { + QUrl url = QUrl::fromUserInput("moonlight://" + address); + if (url.isValid() && !url.host().isEmpty() && url.scheme() == "moonlight") { // If there wasn't a port specified, use the default addNewHost(NvAddress(url.host(), url.port(DEFAULT_HTTP_PORT)), false); }