An invalid domain [.<domain.tld>] was specified for this cookie

book

Article ID: 77040

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) AXIOMATICS POLICY SERVER CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

Customer is integrating with Google reCaptcha. It fails with the following in the tomcat log:

2018-04-10 00:00:41,682::[http-nio-8081-exec-4]::DEBUG::com.ca.gd.ReCaptchaServlet.Servlet.ReCaptchaServlet:: - ReCaptchaServlet: java.lang.IllegalArgumentException: An invalid domain [.<domain.tld>] was specified for this cookie 

How can this be resolved?

Environment

Release: ESPSTM99000-12.51-Single Sign On-Extended Support Plus
Component:

Resolution

Set tomcat to use LegacyCookieProcessor (because Rfc6265CookieProcessor complies with RFC6265 which does not allow domains beginning with non-alphanumeric characters): 

1. Edit the Tomcat/conf/content.xml 

2. Add the statement in betweeen the <context> and </context> tags: 

<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" /> 

3. Restart Tomcat.