mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 13:53:37 -07:00
Set cookie SID value to empty on logout
Set cookie SID expiration date to 1 day in the past on logout
This commit is contained in:
parent
562dd41ab2
commit
1ec122c4ab
1 changed files with 2 additions and 2 deletions
|
@ -375,9 +375,9 @@ bool AbstractWebApplication::sessionStart()
|
||||||
bool AbstractWebApplication::sessionEnd()
|
bool AbstractWebApplication::sessionEnd()
|
||||||
{
|
{
|
||||||
if ((session_ != 0) && (sessions_.contains(session_->id))) {
|
if ((session_ != 0) && (sessions_.contains(session_->id))) {
|
||||||
QNetworkCookie cookie(C_SID, session_->id.toUtf8());
|
QNetworkCookie cookie(C_SID);
|
||||||
cookie.setPath(QLatin1String("/"));
|
cookie.setPath(QLatin1String("/"));
|
||||||
cookie.setExpirationDate(QDateTime::currentDateTime());
|
cookie.setExpirationDate(QDateTime::currentDateTime().addDays(-1));
|
||||||
|
|
||||||
sessions_.remove(session_->id);
|
sessions_.remove(session_->id);
|
||||||
delete session_;
|
delete session_;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue