Commit Graph
25 Commits
Author SHA1 Message Date
Jacques Le Roux e964d61724 Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
This 1st step sorts the plugins. We need to discuss more...
2021-02-14 21:12:52 +01:00
Jacques Le Roux a0f7e77e77 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes all error*.jsp reference, no longer used
2020-07-20 19:27:23 +02:00
Jacques Le Roux d267d161e0 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:51:00 +01:00
Mathieu Lirzin 1158664ba3 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”.
2019-12-07 22:52:30 +01:00
Jacques Le Roux 844fc542d8 Fixed: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML 
https://markmail.org/message/p6fbiojjrwb2ybxd

We decided to put back the session-timeout value in web.xml files and to remove
the line
    session.setMaxInactiveInterval(60*60); //in seconds
from ControlEventListener.java

Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Jacques Le Roux 646e2e9d47 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: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1811041 13f79535-47bb-0310-9956-ffa450edef68
2017-10-04 07:12:57 +00:00
Jacopo Cappellato 96b22285f4 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: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1761304 13f79535-47bb-0310-9956-ffa450edef68
2016-09-18 08:08:30 +00:00
Pranay Pandey e44ba95d72 [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 
http://svn.apache.org/repos/asf/ofbiz/branches/release4.0/framework/images/webapp/images/
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: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1758389 13f79535-47bb-0310-9956-ffa450edef68
2016-08-30 13:37:27 +00:00
Deepak Dixit 8f3141cd46 (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Jacques Le Roux 4deae05a38 Fixes a "typo" in last commit for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
We used targetNamespace (should only be used in schema) instead of xsi:schemaLocation



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1749634 13f79535-47bb-0310-9956-ffa450edef68
2016-06-22 05:58:26 +00:00
Jacques Le Roux a98ac13d9d Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1749489 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:37:47 +00:00
Jacques Le Roux b20816bfa8 Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061 by replacing xsd files references in xml files by -ns.xsd files and removing the concerned xsd files
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1749488 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:14:16 +00:00
Jacques Le Roux 0a982250e6 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]" - https://issues.apache.org/jira/browse/OFBIZ-6807
As suggested by Deepak keeps only <<web-app version="3.0">> in web.xml files instead of whole xmlns and schemaLocation. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1726388 13f79535-47bb-0310-9956-ffa450edef68
2016-01-23 11:52:08 +00:00
Deepak Dixit e91538404a 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: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1724940 13f79535-47bb-0310-9956-ffa450edef68
2016-01-16 09:30:08 +00:00
Arun Patidar 7d1bf43b79 [OFBIZ-6171] Replacing 'Open for Business' references with 'Apache OFBiz'from remaining occurences.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1706593 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 14:31:12 +00:00
Arun Patidar da04c7ce72 [OFBIZ-6171] Applied patch from Pierre Smits for replacing 'Open for Business' references with 'Apache OFBiz'.Thanks Pierre for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1706589 13f79535-47bb-0310-9956-ffa450edef68
2015-10-03 14:15:21 +00:00
Shi Jinghai 732546c8c8 OFBIZ-6601 example component causes exceptions
1. Add specialpurpose/webapp/exampleext/error/error.jsp to display error page.
2. Move specialpurpose/example/widget/exampleext to specialpurpose/exampleext/widget/example.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1701441 13f79535-47bb-0310-9956-ffa450edef68
2015-09-06 04:34:16 +00:00
Jacopo Cappellato fe24506e48 In preparation for the selective disabling of specialpurpose components as a default (when trunk is checked out, built, unit tested, run): explicitely added the "enabled" attribute to all the ofbiz-component.xml files of specialpurpose applications; for now they are all set to "true" (that is the default value) and so this commit will not change the behavior of the system.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1462422 13f79535-47bb-0310-9956-ffa450edef68
2013-03-29 07:21:52 +00:00
Jacques Le Roux 003d891230 A (slightly modified) patch from Tom Burns for "Example Application Issues" https://issues.apache.org/jira/browse/OFBIZ-4960
Problem path 1:
Find Example > Find Example
Select EX01
Click Items Tab (or Features)
Click Example Tab
Expected: Example Details form in the context of the Example menus
Actual: New Example Form under Example Application menus

Problem path 2:
Example > click New Example
Enter a new example
Expected: Example Details form to add Items and Features to the New Example
Actual: Example page filtered on newly created example
(this is a problem for a new user who will not know how to clear the Example Id from the Search Options form. A better path would be to go to the edit forms where the user can add additional information on the example i.e. Items and Features)

Problem path 3:
Features > New Example Features
Enter a Description > Click Create
Enter a Type and Sequence Num
Click Add
Expected: Create a new Example Feature Appl
Actual: Error Problem 3: Error missing exampleFeatureId

jleroux: just put comments about checks Tom wanted to remove: <!-- This is a check useful when only seed data are loaded -->

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1361662 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 08:57:57 +00:00
Jacopo Cappellato 6ad4f89105 As discussed in the dev list, removed the experimental jcr component; its development will continue in the proper branch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1347478 13f79535-47bb-0310-9956-ffa450edef68
2012-06-07 08:14:28 +00:00
Erwan de Ferrieres 6204ba6b9c A patch from yashwant dhakad OFBIZ-4829 Missing decorator location in ExampleExt component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1328793 13f79535-47bb-0310-9956-ffa450edef68
2012-04-22 05:07:49 +00:00
Erwan de Ferrieres e6872bfc5a Missing when reverted at rev 1328790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1328791 13f79535-47bb-0310-9956-ffa450edef68
2012-04-22 05:07:02 +00:00
Erwan de Ferrieres 7abfecf00a Reverting 1328522 Merging exampleext in example application which was a bad idea
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1328790 13f79535-47bb-0310-9956-ffa450edef68
2012-04-22 04:59:49 +00:00
Erwan de Ferrieres 8c7487a2a0 Merging exampleext in example application
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1328522 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 21:55:33 +00:00
Erwan de Ferrieres 52e25d2ed3 Moving example* applications to specialpurpose OFBIZ-4790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1328503 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 21:11:02 +00:00