summaryrefslogtreecommitdiff
path: root/include/authentication.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/authentication.hpp')
-rw-r--r--include/authentication.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/authentication.hpp b/include/authentication.hpp
index 6483365bef..0617cf3729 100644
--- a/include/authentication.hpp
+++ b/include/authentication.hpp
@@ -153,7 +153,7 @@ inline std::shared_ptr<persistent_data::UserSession>
}
sessionOut->cookieAuth = true;
- if constexpr (BMCWEB_INSECURE_DISABLE_CSRF)
+ if constexpr (!BMCWEB_INSECURE_DISABLE_CSRF)
{
// RFC7231 defines methods that need csrf protection
if (method != boost::beast::http::verb::get)
@@ -177,6 +177,7 @@ inline std::shared_ptr<persistent_data::UserSession>
}
}
}
+ return sessionOut;
}
return nullptr;
}