1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-03-13 05:41:17 +00:00

Set HttpOnly attribute to SID cookie

This commit is contained in:
Chocobo1 2017-03-21 15:24:41 +08:00
parent 9eb01fbe4d
commit e9bd75f4e1

View File

@ -354,6 +354,7 @@ bool AbstractWebApplication::sessionStart()
sessions_[session_->id] = session_;
QNetworkCookie cookie(C_SID, session_->id.toUtf8());
cookie.setHttpOnly(true);
cookie.setPath(QLatin1String("/"));
header(Http::HEADER_SET_COOKIE, cookie.toRawForm());