Files
ofbiz-framework/applications/commonext
Jacques Le Roux 369d5f6c95 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

As reported by OWASP ZAP:
A cookie has been set without the SameSite attribute, which means that the
cookie can be sent as a result of a 'cross-site' request. The SameSite attribute
is an effective counter measure to cross-site request forgery, cross-site script
inclusion, and timing attacks.

The solution was not obvious in OFBiz for 2 reasons:

1. There is no HttpServletResponse::setHeader. So we need to use a filter
  (SameSiteFilter) and even that is not enough because of 2:
2. To prevent session fixation we force Tomcat to generates a new jsessionId,
ultimately put in cookie, in LoginWorker::login. So we need to add a call to
SameSiteFilter::addSameSiteCookieAttribute in
UtilHttp::setResponseBrowserDefaultSecurityHeaders.
2020-03-20 17:50:17 +01:00
..
2017-10-27 08:11:12 +00:00

Apache OFBiz

commonext component

This OFBiz component enables organisations to extend the elements in the common component.

more information

For more information about this component visit the product page in the OFBiz WIKI, which can be found at https://cwiki.apache.org/confluence/display/OFBIZ/Extending+the+common+component

issues

JIRA issues related to this component can be found at https://issues.apache.org/jira/browse/OFBIZ/component/12313162

commits

Committed revisions can be viewed at http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext