Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCS-12917: Fix "An unknown error has occurred" raised when zimbraMailURL is configured #791

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions WebRoot/public/login.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
// Delete cookie
Cookie csrfCookie = new Cookie("ZM_LOGIN_CSRF", "");
csrfCookie.setMaxAge(0);
csrfCookie.setPath("/");
response.addCookie(csrfCookie);

pageContext.setAttribute("login_csrf", "");
Expand Down Expand Up @@ -188,6 +189,7 @@
// Delete cookie
Cookie csrfCookie = new Cookie("ZM_LOGIN_CSRF", "");
csrfCookie.setMaxAge(0);
csrfCookie.setPath("/");
response.addCookie(csrfCookie);

pageContext.setAttribute("login_csrf", "");
Expand Down Expand Up @@ -386,12 +388,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