This commit is contained in:
2026-01-23 22:28:43 +01:00
parent f498328249
commit 38ff44f2e9
3 changed files with 8 additions and 4 deletions

View File

@@ -13,8 +13,9 @@ std::string getSessionId(const crow::request& req) {
auto cookie_header = req.get_header_value("Cookie");
std::string prefix = "session_id=";
auto pos = cookie_header.find(prefix);
if (pos == std::string::npos) return "";
return cookie_header.substr(pos + prefix.size(), 32);
if (pos == std::string::npos)
return "";
return cookie_header.substr(pos + prefix.size(), Session::SESSION_ID_SIZE);
}
bool isLoggedIn(const crow::request& req) {