Cookie Names with Invalid Characters in Custom Code Cause Errors

Our servlet container is now upgraded to implement Java Servlet specification 4.0, which has stricter rules for cookie names. Any use of invalid characters in a cookie name, as described in RFC6265, which references RFC2068, now causes an exception.

How: To avoid the exception, in custom code, an invalid cookie name passed to the constructor dw.web.Cookie is now replaced by the underscore character. An error message is logged that shows the original cookie name and the sanitized name with the underscore characters.

Rework any custom code that results in invalid cookie names, since the server also drops incoming request cookies that include invalid characters. The invalid cookie never reaches the server as an incoming request.