aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2026-06-15 17:39:40 +0000
committertobtoht <tob@featherwallet.org>2026-06-15 17:39:40 +0000
commit0a6ba55c69d4ba748865a530bcda5045d5599f24 (patch)
tree11a7be73cdaf1a757644e55f5a438669e1da5702
parentaf56df631270447027b341698e4a3309d8ea2f4e (diff)
parent082cf9a4e6e567d96e85227e8c7707fcfe59bbbc (diff)
downloadmonzero-gui-0a6ba55c69d4ba748865a530bcda5045d5599f24.tar.gz
monzero-gui-0a6ba55c69d4ba748865a530bcda5045d5599f24.tar.xz
monzero-gui-0a6ba55c69d4ba748865a530bcda5045d5599f24.zip
Merge pull request #4596
082cf9a network: require SSL for HTTPS requests (selsta) ACKs: plowsof
-rw-r--r--src/qt/network.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/qt/network.cpp b/src/qt/network.cpp
index ba6c94d6..574369c9 100644
--- a/src/qt/network.cpp
+++ b/src/qt/network.cpp
@@ -144,7 +144,17 @@ QString Network::get(
const QString &contentType /* = {} */) const
{
const QUrl urlParsed(url);
- httpClient->set_server(urlParsed.host().toStdString(), urlParsed.scheme() == "https" ? "443" : "80", {});
+ const bool isHttps = urlParsed.scheme() == "https";
+
+ const auto sslSupport = isHttps
+ ? epee::net_utils::ssl_support_t::e_ssl_support_enabled
+ : epee::net_utils::ssl_support_t::e_ssl_support_disabled;
+
+ httpClient->set_server(
+ urlParsed.host().toStdString(),
+ std::to_string(urlParsed.port(isHttps ? 443 : 80)),
+ {},
+ epee::net_utils::ssl_options_t{sslSupport});
const QString uri = (urlParsed.hasQuery() ? urlParsed.path() + "?" + urlParsed.query() : urlParsed.path());
const http_response_info *pri = NULL;