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

no-jira: remove usage of unsecure getRequestSessionId()

parent 1401ce55
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,6 @@ public class UserSessionSnoopController extends BasicController {
appendFormattedKeyValue(sb, "Query String", hreq.getQueryString());
HttpSession hsession = hreq.getSession();
appendFormattedKeyValue(sb, "Requested Session Id", hreq.getRequestedSessionId());
appendFormattedKeyValue(sb, "Current Session Id", hsession.getId());
appendFormattedKeyValue(sb, "Session Created Time", new Long(hsession.getCreationTime()));
appendFormattedKeyValue(sb, "Session Last Accessed Time", new Long(hsession.getLastAccessedTime()));
......
......@@ -107,7 +107,7 @@ public class DMZDispatcher implements Dispatcher {
try{
long bypasscreationtime = Long.parseLong(cookie.getValue());
if (System.currentTimeMillis()-bypasscreationtime<5*60*1000) {
log.info("Allowing request with valid bypass cookie, sessionId="+request.getRequestedSessionId());
log.info("Allowing request with valid bypass cookie");
validBypass = true;
}
} catch(NumberFormatException e) {
......@@ -120,7 +120,7 @@ public class DMZDispatcher implements Dispatcher {
}
if (!validBypass) {
final String rejectUrl = request.getRequestURI();
log.info("Rejecting request to DMZDispatcher (AuthHelper.isRejectDMZRequests() is true) to "+rejectUrl+", sessionId="+request.getRequestedSessionId());
log.info("Rejecting request to DMZDispatcher (AuthHelper.isRejectDMZRequests() is true) to " + rejectUrl);
if (sessionCookie!=null) {
String newSessionId = sessionCookie.getValue().substring(0, sessionCookie.getValue().length()-2);
response.setHeader("Set-Cookie", "JSESSIONID="+newSessionId+"; Path="+request.getContextPath()+(request.isSecure()?"":"; Secure"));
......
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