From 534615373ea026b3de6ac6039badf91caba157a6 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 27 May 2024 23:40:40 +0800 Subject: [PATCH] Use simpler conversion The cookie value can only contain ASCII characters. --- src/webui/webapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/webapplication.cpp b/src/webui/webapplication.cpp index 1394e1e46..65331f1ea 100644 --- a/src/webui/webapplication.cpp +++ b/src/webui/webapplication.cpp @@ -740,7 +740,7 @@ void WebApplication::sessionStart() connect(m_freeDiskSpaceChecker, &FreeDiskSpaceChecker::checked, syncController, &SyncController::updateFreeDiskSpace); m_currentSession->registerAPIController(u"sync"_s, syncController); - QNetworkCookie cookie {m_sessionCookieName.toLatin1(), m_currentSession->id().toUtf8()}; + QNetworkCookie cookie {m_sessionCookieName.toLatin1(), m_currentSession->id().toLatin1()}; cookie.setHttpOnly(true); cookie.setSecure(m_isSecureCookieEnabled && m_isHttpsEnabled); cookie.setPath(u"/"_s);