Skip to content

Commit

Permalink
🐛 webui: Fix bug of cookie cannot set expiration (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rirmach authored Nov 3, 2024
1 parent 5c2e555 commit 139035a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/webui/webapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ void WebApplication::sessionStart()
cookie.setHttpOnly(true);
cookie.setSecure(m_isSecureCookieEnabled && m_isHttpsEnabled);
cookie.setPath(u"/"_s);
cookie.setExpirationDate(QDateTime::currentDateTime().addSecs(m_sessionTimeout));
if (m_isCSRFProtectionEnabled)
cookie.setSameSitePolicy(QNetworkCookie::SameSite::Strict);
else if (cookie.isSecure())
Expand Down

0 comments on commit 139035a

Please sign in to comment.