Skip to content

Commit

Permalink
ZCS-12917: added path to ZM_TEST and ZM_LOGIN_CSRF cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
k-kato committed Feb 1, 2023
1 parent 6ebcc09 commit 7de21b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WebRoot/public/login.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,14 @@ if (application.getInitParameter("offlineMode") != null) {
<%
Cookie testCookie = new Cookie("ZM_TEST", "true");
testCookie.setSecure(com.zimbra.cs.taglib.ZJspSession.secureAuthTokenCookie(request));
testCookie.setPath("/");
response.addCookie(testCookie);
String csrfToken = UUID.randomUUID().toString();
Cookie csrfCookie = new Cookie("ZM_LOGIN_CSRF", csrfToken);
csrfCookie.setSecure(com.zimbra.cs.taglib.ZJspSession.secureAuthTokenCookie(request));
csrfCookie.setHttpOnly(true);
csrfCookie.setPath("/");
response.addCookie(csrfCookie);
pageContext.setAttribute("login_csrf", csrfToken);
Expand Down

0 comments on commit 7de21b9

Please sign in to comment.