minor fix - webstore broken when login with admin @ gardenworld.com -> RFC6265 Cookie values may not contain character [ ]

This commit is contained in:
Carlos Ruiz 2019-01-04 02:05:08 +01:00
parent 08d59a036d
commit 8355ea74bf
1 changed files with 2 additions and 0 deletions

View File

@ -1136,11 +1136,13 @@ public final class WebUtil
*/
public static void addCookieWebUser (HttpServletRequest request, HttpServletResponse response, String webUser, String COOKIE_NAME)
{
if (! webUser.matches(".*[ ,;].*")) {
Cookie cookie = new Cookie(COOKIE_NAME, webUser);
cookie.setComment("adempiere Web User");
cookie.setPath(request.getContextPath());
cookie.setMaxAge(2592000); // 30 days in seconds 60*60*24*30
response.addCookie(cookie);
}
} // setCookieWebUser
/**