From 272d53fdf888f536c0d7915b0b5f7c79ed0a930c Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 22 Mar 2017 16:54:07 +0800 Subject: [PATCH] Set cookie SID value to empty on logout Set cookie SID expiration date to 1 day in the past on logout --- src/webui/abstractwebapplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webui/abstractwebapplication.cpp b/src/webui/abstractwebapplication.cpp index 436a5325b..f29d891ee 100644 --- a/src/webui/abstractwebapplication.cpp +++ b/src/webui/abstractwebapplication.cpp @@ -367,9 +367,9 @@ bool AbstractWebApplication::sessionStart() bool AbstractWebApplication::sessionEnd() { if ((session_ != 0) && (sessions_.contains(session_->id))) { - QNetworkCookie cookie(C_SID, session_->id.toUtf8()); + QNetworkCookie cookie(C_SID); cookie.setPath(QLatin1String("/")); - cookie.setExpirationDate(QDateTime::currentDateTime()); + cookie.setExpirationDate(QDateTime::currentDateTime().addDays(-1)); sessions_.remove(session_->id); delete session_;