Skip to content

Commit

Permalink
send cookies via secure channel
Browse files Browse the repository at this point in the history
  • Loading branch information
EcljpseB0T committed Sep 19, 2023
1 parent 00e8ea7 commit 06d9d3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions ua/org.eclipse.help.webapp/advanced/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
if(data.getMode() == LayoutData.MODE_INFOCENTER){
Cookie cookieTest=new Cookie("cookiesEnabled", "yes");
cookieTest.setMaxAge(365*24*60*60);
cookieTest.setSecure(true);
response.addCookie(cookieTest);
}
%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ private static String getForcedLocale(HttpServletRequest request,
// save locale (in session cookie) for later use in a user session
if (response != null) {
Cookie cookieTest = new Cookie("lang", forcedLocale); //$NON-NLS-1$
cookieTest.setSecure(true);
response.addCookie(cookieTest);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public static void setCookieValue(String name, String value,
if ( needsCookiePath(request)) {
cookie.setPath(getCookiePath(request)); // Only set path if necessary
}
cookie.setSecure(true);
response.addCookie(cookie);
if (HelpWebappPlugin.DEBUG_WORKINGSETS) {
System.out
Expand All @@ -77,6 +78,7 @@ public static void setCookieValueWithoutPath(String name, String value,
Cookie cookie = new Cookie(name, value);
cookie.setMaxAge(COOKIE_LIFE);

cookie.setSecure(true);
response.addCookie(cookie);
if (HelpWebappPlugin.DEBUG_WORKINGSETS) {
System.out
Expand Down Expand Up @@ -109,6 +111,7 @@ protected static void deleteCookieUsingPath(String name, HttpServletRequest requ
cookie.setPath(cookiePath);
}
cookie.setMaxAge(0);
cookie.setSecure(true);
response.addCookie(cookie);
}

Expand Down

0 comments on commit 06d9d3e

Please sign in to comment.