summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/src/base.cpp2
-rw-r--r--gentoobrowse/src/user.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/gentoobrowse/src/base.cpp b/gentoobrowse/src/base.cpp
index 5ed5114..e9c3033 100644
--- a/gentoobrowse/src/base.cpp
+++ b/gentoobrowse/src/base.cpp
@@ -12,7 +12,7 @@ namespace GentooBrowse {
common::currentUser(const IceSpider::IHttpRequest * request) const
{
if (auto sid = request->getCookieParam("sessionId")) {
- if (auto s = prx0->getSession(*sid)) {
+ if (auto s = prx0->getSession(std::string(*sid))) {
auto uid = s->variables.find("userId");
if (uid != s->variables.end()) {
return prx1->get(boost::lexical_cast<Ice::Int>(uid->second));
diff --git a/gentoobrowse/src/user.cpp b/gentoobrowse/src/user.cpp
index cf56b43..c764872 100644
--- a/gentoobrowse/src/user.cpp
+++ b/gentoobrowse/src/user.cpp
@@ -35,7 +35,7 @@ namespace GentooBrowse {
auto s = prx0->createSession();
s->variables[USERID] = boost::lexical_cast<std::string>(user->userid);
prx0->updateSession(s);
- request->setCookie(SESSIONID, s->id, IceUtil::None, "/"s);
+ request->setCookie(SESSIONID, s->id, std::nullopt, "/"s);
request->responseRedirect("/user/home", "Authenticated"s);
}
@@ -113,7 +113,7 @@ namespace GentooBrowse {
auto s = prx0->createSession();
s->variables[USERID] = boost::lexical_cast<std::string>(user->userid);
prx0->updateSession(s);
- request->setCookie(SESSIONID, s->id, IceUtil::None, "/"s);
+ request->setCookie(SESSIONID, s->id, std::nullopt, "/"s);
request->responseRedirect("/user/home", "Verified, welcome!"s);
}
@@ -246,7 +246,7 @@ namespace GentooBrowse {
void execute(IceSpider::IHttpRequest * request) const
{
prx0->destroySession(*request->getCookieParam<std::string>(SESSIONID));
- request->setCookie(SESSIONID, std::string(), IceUtil::None, "/"s, false, 0);
+ request->setCookie(SESSIONID, std::string(), std::nullopt, "/"s, false, 0);
request->responseRedirect("/", "Logged out"s);
}