mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-22 21:55:39 +00:00
use secure cookies (see https://github.com/SAP/sailing-analytics/security/code-scanning/91)
This commit is contained in:
+1
@@ -58,6 +58,7 @@ public class LocaleInjectionFilter implements Filter {
|
||||
preferredLocale.toLanguageTag());
|
||||
cookie.setMaxAge(-1);
|
||||
cookie.setPath("/");
|
||||
cookie.setSecure(true);
|
||||
resp.addCookie(cookie);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -381,6 +381,7 @@ public class UserManagementServiceImpl extends RemoteServiceServlet implements U
|
||||
final Cookie cookie = new Cookie(UserManagementConstants.LOCALE_COOKIE_NAME, "");
|
||||
cookie.setMaxAge(0);
|
||||
cookie.setPath("/");
|
||||
cookie.setSecure(true);
|
||||
getThreadLocalResponse().addCookie(cookie);
|
||||
logger.info("Invalidated HTTP session");
|
||||
return new SuccessInfo(true, "Logged out.", /* redirectURL */ null, null);
|
||||
|
||||
Reference in New Issue
Block a user