Session* session = nullptr;
try {
- session = request.getSession();
+ session = request.getSession(true, false, false); // don't cache it
}
catch (exception& e) {
log.warn("error during session lookup: %s", e.what());
throw;
}
+ Locker slocker(session, false); // pop existing lock on exit
if (session) {
// Check for logout interception.
if (requireLogoutWith.first) {
Category& log = Category::getInstance(SHIBSP_LOGCAT".ServiceProvider");
const Application* app = nullptr;
- const Session* session = nullptr;
+ Session* session = nullptr;
+ Locker slocker;
string targetURL = request.getRequestURL();
try {
// Do we have an access control plugin?
if (settings.second) {
try {
- session = request.getSession(false);
+ session = request.getSession(false, false, false); // ignore timeout and do not cache
+ if (session)
+ slocker.assign(session, false); // assign to lock popper
}
catch (exception& e) {
log.warn("unable to obtain session to pass to access control provider: %s", e.what());
Category& log = Category::getInstance(SHIBSP_LOGCAT".ServiceProvider");
const Application* app = nullptr;
- const Session* session = nullptr;
+ Session* session = nullptr;
+ Locker slocker;
string targetURL = request.getRequestURL();
try {
app = &(request.getApplication());
try {
- session = request.getSession(false);
+ session = request.getSession(false, false, false); // ignore timeout and do not cache
+ if (session)
+ slocker.assign(session, false); // assign to lock popper
}
catch (exception& e) {
log.warn("unable to obtain session to export to request: %s", e.what());
}
catch (exception& e) {
request.log(SPRequest::SPError, e.what());
- const Session* session = nullptr;
+ Session* session = nullptr;
try {
- session = request.getSession(false, true);
+ session = request.getSession(false, true, false); // do not cache
}
catch (exception&) {
}
+ Locker slocker(session, false); // pop existing lock on exit
TemplateParameters tp(&e, nullptr, session);
tp.m_map["requestURL"] = targetURL.substr(0, targetURL.find('?'));
tp.m_request = &request;