Skip to content
Snippets Groups Projects
Commit fbfd534b authored by srosse's avatar srosse
Browse files

OO-1383: hardened against user without session

parent 839c1727
No related branches found
No related tags found
No related merge requests found
...@@ -394,14 +394,16 @@ public class AuthHelper { ...@@ -394,14 +394,16 @@ public class AuthHelper {
* @param ureq * @param ureq
*/ */
public static void doLogout(UserRequest ureq) { public static void doLogout(UserRequest ureq) {
//clear session settings of replayable urls / load performance mode if(ureq == null) return;
//XX:GUIInterna.setLoadPerformanceMode(null);
Boolean wasGuest = ureq.getUserSession().getRoles().isGuestOnly(); boolean wasGuest = false;
UserSession usess = ureq.getUserSession();
if(usess != null && usess.getRoles() != null) {
wasGuest = ureq.getUserSession().getRoles().isGuestOnly();
}
String lang = I18nManager.getInstance().getLocaleKey(ureq.getLocale()); String lang = I18nManager.getInstance().getLocaleKey(ureq.getLocale());
HttpSession session = ureq.getHttpReq().getSession(false); HttpSession session = ureq.getHttpReq().getSession(false);
//session.removeAttribute(SessionListener.SESSIONLISTENER_KEY);
//TODO: i assume tomcat, after s.invalidate(), lets the GC do the work
// if not, then do a s.removeAttribute....
// next line fires a valueunbound event to UserSession, which does some // next line fires a valueunbound event to UserSession, which does some
// stuff on logout // stuff on logout
if (session != null) { if (session != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment