Clone Tools
  • last updated a few minutes ago
Constraints: committers
Constraints: files
Constraints: dates
Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.


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


  1. … 20 more files in changeset.
Fixed: Add XML declaration in “web.xml” files (OFBIZ-6993)

These declarations avoid SAXParseException traceback when parsing web.xml

the first time in WebappUtil.parseWebXmlFile

A schema conformance issue has been fixed in ecommerce “web.xml”.

  1. … 25 more files in changeset.
Fixed: Add session tracking mode and make cookie secure (OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML

We decided to put back the session-timeout value in web.xml files and to remove

the line

session.setMaxInactiveInterval(60*60); //in seconds


Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 22 more files in changeset.
Improved: Add session tracking mode and make cookie secure (OFBIZ-6655)

Programmatically replaces the web.xml <session-config> declarations and uses

the @WebListener annotation to start the process. This avoid to duplicates

things everywhere in web.xml files. Since the web.xml files have precedence

on annotations, the setting can be easily overridden when necessary.

Now that we also use HTTPS in ecommerce the ecommerce session cookie is

also secured.

I also noted that we had 8 weird <session-timeout> declarations:

in solr component: <session-timeout>2</session-timeout>

in themes: <session-timeout>1</session-timeout>

Also in Rainbowstone we lacked the <cookie-config> and <tracking-mode>

declarations. I think it's not good.

I resolve these points by simply removing the <session-config> in web.xml files

of themes and Solr.

Thanks: Pradhan Yash Sharma for review

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 24 more files in changeset.
Implemented: removed the "controller" related logic, that is now provided by the new ControlFilter, from the ContextFilter; modified existing applications to use the two filters in a chain; removed from the other specialized filters all the logic that was duplicated or extended from ContextFilter.

A web application, in order to leverage the OFBiz framework, requires that a

series of objects are in its contexts (servlet context, session and request)

such as "delegator", "delegatorName", "dispatcher", "security" etc. etc...

This setup is performed by the logic contained in the servlet filter implemented

by the ContextFilter class.

The execution of this logic is required for the application to run properly.

However, before this commit, in the ContextFilter there was other logic, related

to access control and redirection rules (some of them performed in coordination

with the ControlServlet), making it difficult to deploy this filter in all the

web applications, especially the ones that implement special handling of paths.

In fact, this filter was deployed in most but not all the web application in the

OFBiz codebase: specifically it was not deployed in web applications that

require the execution of other filters (e.g. CatalogUrlFilter, etc...) like the

ones in the "ecommerce" and "solr" components.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 25 more files in changeset.
[OFBIZ-7311] - Applied the patch from the ticket. Removing the unused references of the maincss.css from source code, following is done- 1) Removed 'maincss.css' entry from 'allowedPaths' param of from web.xml Reason: Since, there is no file like 'maincss.css' exist under any includes directory. 2) Removed the unused references of maincss.css from FTLs, code <link rel="stylesheet" href="${StringUtil.wrapString(baseUrl!)}/images/maincss.css" type="text/css"/> has been removed. Reason: This is an interesting thing, these FTLs were using the maincss.css located under the images directory. When I look the history of these files, following were my findings, The 'maincss.css' file under the 'images' directory exist in release4.0 after this release, this files no longer exist there. 3) Also, I have updated one file 'InventoryNoticeEmail.ftl' and used the basic HTML code to style, instead of using style defined in 'maincss.css' which were exist in release-4.0 4) Updated some references from 'maincss.css' to style.css in comments. 5) Also removed the entry of including '/images/maincss.css' and '/images/mainrtl.css' in SimpleDecorator Since, these files no longer exist after release-4.0.

Thanks Wai for reviewing the work and thanks Swapnil M Mane for the contribution.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 20 more files in changeset.
(OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 636 more files in changeset.
Temporary fix for "UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema with publicId [null] and the file/resource is [web-app_3_0.xsd]" -

As suggested by Deepak keeps only <<web-app version="3.0">> in web.xml files instead of whole xmlns and schemaLocation.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 26 more files in changeset.
OFBIZ-(6655) Add session tracking mode and make cookie secure for all special purpose component. Also updated the web-app version for web.xml files.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 18 more files in changeset.
[OFBIZ-6171] Applied patch from Pierre Smits for replacing 'Open for Business' references with 'Apache OFBiz'.Thanks Pierre for the contribution.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 64 more files in changeset.
Removed the old and unused "serviceReaderUrls" context-param from all the web applications.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 8 more files in changeset.
Moved the "birt" component out of framework to specialpurpose; moved all the birt reports from the applications to the birt component itself, where the application webapps are overriden to inject the reports; the end result is the same but since all these birt reports are simply a proof of concepts that cannot be used in production (for example they use hardcoded userlogin for authentication) the birt component should be probably disabled by default (but this will be discussed in the dev list). Now it will be very easy to extract the birt component (for OFBiz Extras) or to disable it when deploying to production or when interested in sparing some hardware resources. I did some cursory tests but since the work has been challenging and rather complex I would appreciate testing help and also reviews to finds chunks of code that I could have missed and that could be moved out as well.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68

  1. … 123 more files in changeset.