I've two applications with a common domain name i.e let's say www.kishore.com/travelSite and www.kishore.com/researchSite.
So, in the travelSite I'm creating a cookie as below
Cookie cookie = new Cookie("someName","someValue");
cookie.setSecure(true);
cookie.setHttpOnly(true);
cookie.setPath("/");
Here the reason I'm setting Path to / in travelSite is because, I want this cookie to be used in researchSite. But the problem is, when I send this code for scanning, it says it's vulnerable to use context path i.e /.
Setting this /travelSite could eliminate vulnerable error in scanning but can't be used the the researchSite.
Wanted to know if there is a workaround? Can I set domain name i.e kishore.com in the cookie path. If so how?