Commit Graph
307 Commits
Author SHA1 Message Date
Jacques Le Roux ec2b84341e Reverted: "Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)"
This reverts commit 17eb2e4cf7.

It does not work when using <<target="javascript:........>>
I could change those cases but it's easier and safer to simply revert back to
target-type!

Thanks: James for report
2020-12-18 11:08:32 +01:00
Jacques Le Roux 17eb2e4cf7 Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)
Same for sub-hyperlink
2020-12-11 16:52:04 +01:00
holivier 4a41f0fde5 Documented: migration to help system using asciidoc files (OFBIZ-11587)
commit correction for <Remove all related help docbook files>
* reAdd a contentDocData for main contentId and portletCategory
* remove from ofbiz-component of each application line about helpData which are removed
2020-10-27 11:20:09 +01:00
holivier 302bc0eb15 Documented: migration to help system using asciidoc files (OFBIZ-11587)
Remove all related help docbook files
2020-10-26 17:34:03 +01:00
Jacques Le Roux 2d033df446 Improved: Update information in README.md files from removed pages in wiki 2020-08-29 17:37:18 +02:00
Jacques Le Roux c8c5895707 Reverted: "Improved: Have a readme in every component (OFBIZ-6243)"
This reverts commit f281fe290a.

An Apache URL is much easier to have (NO bad idea)
2020-08-29 13:52:27 +02:00
Jacques Le Roux f281fe290a Improved: Have a readme in every component (OFBIZ-6243)
An Apache URL is much easier to have
2020-08-29 13:49:41 +02:00
Jacques Le Roux ee0968440e Improved: Have a readme in every component (OFBIZ-6243)
Not sure why we have this problem (according to
https://docs.github.com/en/github/authenticating-to-github/about-anonymized-image-urls
could be to missing cache control in our site server)

As I was fed up not viewing the OFBIz logo anywhere, and mostly in GH,
but just in browser at https://ofbiz.apache.org/images/ofbiz_logo.png
and I noticed I was viewing it well locally at
https://github.com/apache/ofbiz-framework/tree/trunk/themes/rainbowstone
so decided to use this URL everywhere rather!
2020-08-29 13:35:14 +02:00
Jacques Le Roux d15cc57bf0 Improved: Have a readme in every component (OFBIZ-6243)
This preludes the move of content of README.md files into the asciidoc
documentation

Updates the link to OFBiz-logo.png
Removes deprecated information related to Svn, Jira and Confluence
We will move the wiki pages to wiki attic with OFBIZ-11619
2020-08-29 11:52:51 +02:00
Jacques Le Roux fc865c458a Fixed: One page checkout is broken because of ordermgr::getAssociatedStateList (OFBIZ-11838)
On orderview screen at the ordermgr, when a user tries to change the status of
the order, in OrderInfo.ftl, we are calling "changeOrderStatus" request as

<@ofbizUrl>changeOrderStatus/orderview</@ofbizUrl>

Hence when the request is done, it is rewriting URL to
https://localhost:8443/ordermgr/control/changeOrderStatus/orderview.

When js functions running in the backend like "getAssociatedStateList" are
called, they are getting the wrong URL to send a request to. This was causing
the issue.

For now, there are two different fixes that can handle both problems which are
mentioned in OFBIZ-2562 and OFBIZ-11838.

1.
  To change the request mapping for "changeOrderStatus" and add request-redirect
  to "orderview" screen. Change the actions in the forms in OrderInfo.ftl to
  call "changeOrderStatus" request only and then remove code in
  "getAssociatedStateList" js function to rewrite URL.

2.
  To add .length to the existing URL rewrite code written in
  "getAssociatedStateList" js function as

if (jQuery('#orderViewed').length) {
    requestToSend = "/ordermgr/control/getAssociatedStateList"
}

Thanks: Pritam Kute!

I picked the 2nd solution
2020-07-25 14:07:19 +02:00
holivier b3fbf6d680 Documented: remove old content links for ofbiz-setup, the docs have
been migrated to asciidoc (OFBIZ-11587)
2020-07-22 18:15:07 +02:00
holivier bd0efaf89b Documented: remove docbook migrated to asciidoc, portlet help are now
in ofbiz-plugins / MyPortal (OFBIZ-11587)
2020-07-22 18:13:28 +02:00
holivier b36943d56f Documented: Check all docbook file in each applications-component
documents directory
(OFBIZ-11587)

remove all files
2020-07-14 16:55:05 +02:00
holivier 492511c1a0 Documented: remove docbook help files for commonext
(OFBIZ-11587)

all files have been migrated to asciidoc format and help link now point
to the html file generated from the asciidoc files
2020-06-06 14:35:46 +02:00
holivier 2d0be47cdf Documented: Help link using asciidoc files via generated html
(OFBIZ-11693)

Migrate CommonExtHelData.xml to added some <set field="helpAnchor" to
the correct screens

Now in commonext component only asciidoc documents are used, help link
area now link to userDocUri
(ci.apache.org/projects/ofbiz/site/trunk/ofbizdoc as default value in
general.property)
2020-06-06 14:26:33 +02:00
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
holivier 5c88250932 Documented: revert remove docbook help files for commonext-SETUP
(OFBIZ-11420)

Removing Help files in docbook format break the current online help
2020-02-26 11:29:07 +01:00
holivier 3ebb9f6bbc Documented: All setup help file in docbook format migration to asciidoc
format
(OFBIZ-11363)

ofbiz-setup.adoc included all setup files and user-documentation.adoc
include ofbiz-setup
2020-02-25 22:04:21 +01:00
Jacques Le Roux 01bd096dc6 Fixed: The "stream" request-map in ecommerce and commonext controllers
requires authentication
(OFBIZ-11349)

Thanks: Michael for reporting a possible issue when only commenting the "stream"
request-map in commonext controller. And Jacopo to suggest to require
authentication (after suggesting to comment out)

It should be also noted that when the CSRF defense implementation will be in
place, all XSS vulnerabilities w/o authentication will not longer be possible.
Because then all requests shall contains a CSRF token.
2020-02-19 13:48:23 +01:00
Jacques Le Roux 72d1995d39 Fixed: Temporarily comment out the "stream" request-map in commonext controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to require
(maybe only temporarily) the "stream" request-map in commonext controller
to need authentication.

We will later check that this has no impact and if necessary remove the
mandatory authentication, see OFBIZ-11349
2020-02-19 09:34:50 +01:00
Jacques Le Roux 9db0d8f2fb Fixed: Temporarily comment out the "stream" request-map in ecommerce controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to
temporarily comment out the "stream" request-map in commonext controller.
We will later fix the specific issue to put back the functionalities allowed by
the "stream" request-map in this controller, see OFBIZ-11349
2020-02-14 10:19:03 +01:00
Mathieu Lirzin aae1c8a8f5 Reverted: "Improved: Use ‘depends-on’ attribute instead of “component-load.xml”"
(OFBIZ-11296)

This reverts commit eeabe69813.
2019-12-18 12:09:20 +01:00
Samuel Trégouët 62c617eeec 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
2019-12-07 22:58:29 +01:00
Mathieu Lirzin 3b14e7afa9 Reverted: "Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)"
This reverts commit a93b1fcb78.
2019-11-27 21:42:33 +01:00
Mathieu Lirzin b006b8c7cb Revert "Improved: Update “web.xml” files version 3.0 → 4.0 (OFBIZ-6993)"
This reverts commit 226e901981.
2019-11-27 21:40:10 +01:00
Samuel Trégouët 226e901981 Improved: Update “web.xml” files version 3.0 → 4.0 (OFBIZ-6993) 2019-11-27 17:29:41 +01:00
Samuel Trégouët a93b1fcb78 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
2019-11-27 17:28:44 +01:00
Mathieu Lirzin eeabe69813 Improved: Use ‘depends-on’ attribute instead of “component-load.xml” (OFBIZ-11296)
We currently have two ways to define component loading order. Either
by using ‘depends-on’ attribute in “component-config.xml” or by adding
a “component-load.xml” file at the root of a component directory.

“depends-on” is more flexible because it handles partial ordering when
“component-load.xml” defines a total order which is not necessarily
meaningful, so it is better to rely only “depends-on”.

This removes the usage of “component-load.xml” to use ‘depends-on’
instead. The dependency declarations correspond to the total ordering
previously defined but will need to be refined in the future to relax
unnecessary dependency declarations.

Only “framework/base/config/component-load.xml” which defines the
top-level directories order (framework, applications, themes and
plugins) is kept.
2019-11-25 15:28:54 +01:00
Jacques Le Roux 8f4cfeb951 Fixed: baseEcommerceSecureUrl does not work in ecomseo.
(OFBIZ-11267)

This fixes it by introducing a new pattern in SeoConfig.xml
2019-11-02 09:43:08 +01:00
Mathieu Lirzin daa1e6160e Reverted: JSON entity data import and export utility
(OFBIZ-10966)

Implementation was not matching OFBiz code quality requirements.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867342 13f79535-47bb-0310-9956-ffa450edef68
2019-09-22 12:29:54 +00:00
Nicolas Malin f4aab777a5 Improved: Refactoring permission model call
(OFBIZ-7113)
With the problem to have a permission service not on the same transaction that the related service [1]

I realized the following improvement to
 * unified call evalPermission
 * move all related field for permission service on ModelService to ModelPermission
 * Remove deprecated code
 * add labelized error message  
 * call as same transaction the permission service by defautl with possibility to overide this rule 
 * add new attributes on permission model: require-new-transaction and return-error-on-failure

Thanks to Jacques Leroux for the review


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866137 13f79535-47bb-0310-9956-ffa450edef68
2019-08-30 08:47:48 +00:00
Jacques Le Roux b16285dd64 Implemented: JSON entity data import and export utility
(OFBIZ-10966)

Currently, we support import/export entity data in XML format.
  Nowadays JSON is widely used in industry, we can have support for JSON format 
  which looks quite similar to XML support.

Here is example of XML data and it's JSON version
<Party partyId="123456" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
{“Party”: {"partyId":"123456","partyTypeId":"PERSON","statusId":"PARTY_ENABLED”}}

Design Proposal

We can write entityImportJson and entityImportDirJson services for importing 
JSON from screen and directory respectively.
And the entityExportAllJson service for exporting entity data in JSON.

Import Design
 The import service will perform following operations:
 1.) Validate the input JSON data
 2.) On successful validation, convert JSON to OFBiz's entity model 
     (GenericValue)
 3.) The GenericValue will be inserted in database by some handler class for e.g 
     we can write JsonDataHandler, it will convert given JSON to 
     List<GenericValue>, and finally write it to database 
     (Similar pattern is used in XML import).

Export Design
 Based on existing XML pattern the writeXmlText method of GenericEntity class 
 write the exported data in XML format. 
 In the similar way, we can implement writeJsonText to export data in JSON format.

jleroux: I fixed 2 trivials things and at my request in last patch Jayansh added 
"JSON Data Export All" and "JSON Data Import Dir

Thanks: Jayansh Shinde 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862206 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 11:49:22 +00:00
Jacques Le Roux 28e119027c Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(OFBIZ-11064)

As we all know, Groovy is a powerful language with great built-in functions. 
Groovy Truth[1] is one of them, which is not used properly in our code base. 
We have used UtilValidate Class to validate arguments for Empty or NotEmpty, 
which can easily be done in groovy with built-in functionality[1].
 
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
 
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
 
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{  // Not set, use a default  maxRetry = -1 }

Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero.  So it's best not to use groovy truth for null-checks on
numbers in some cases. 
 
Thanks: Pawan Verma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Jacques Le Roux 33b1223681 Fixed: Stores can't be modified at ofbizsetup/control/updateProductStore
(OFBIZ-10930)

Same than parent issue (OFBIZ-10567) but in ofbizsetup component (which should 
have been names setup BTW, I created a setup component for that in Jira)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857692 13f79535-47bb-0310-9956-ffa450edef68
2019-04-17 16:19:00 +00:00
Nicolas Malin 2e1cacb2a8 Improved: Improve error message page to support Theming
(OFBIZ-10753)

When OFBiz raise an error, the framework use a jsp page to display it.
I improved the error page generation to support also ftl template rendering and by this way extend the theme engine to support to overide it

On controler.xml we can now use :
    <errorpage>/error/error.jsp</errorpage>
or 
    <errorpage>component://common/webcommon/error/Error.ftl</errorpage> (default configuration)

On your theme you can add your own error page :
    <template> 
      ...
      <template-file widget=menu location=component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl/>
    + <template-file widget=error location=component://common-theme/template/ErrorPage.ftl/>
    </template>

The component://common/webcommon/error/Error.ftl contains the logic theming connection and to simplify source code, all framework old error page (error.jsp) have been removed to centralize all on this new page.

Thanks to Marine Desmarchelier for the error page design

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856175 13f79535-47bb-0310-9956-ffa450edef68
2019-03-25 09:31:02 +00:00
Jacques Le Roux d2485c4069 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-framework/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Aditya Sharma 08fc69e679 Improved: Replace jQuery.bind() with jQuery.on()
(OFBIZ-10758)
As of jQuery 3.0, .bind() has been deprecated. It was superseded by the .on() method for attaching event handlers to a document.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850711 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 05:06:43 +00:00
Rishi Solanki c51e0e7358 Improved: Add an ofbizsetup prefix to the data files names used by the ofbizsetup app.
(OFBIZ-10598)

Added prefix to files as OfbizSetup to better understand its usage.
Changes the file names and adds a missing files used in the SetupEvents xml events to setup ofbiz. 

Thanks to Jacques for reporting the issue and help.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845104 13f79535-47bb-0310-9956-ffa450edef68
2018-10-29 11:24:26 +00:00
Suraj Khurana 9ca5823a8a Improved: Consistency and Readability improvements for include-menu tag.
(OFBIZ-8972)
Thanks Ankush Upadhyay for reporting and Devanshu Vyas for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845088 13f79535-47bb-0310-9956-ffa450edef68
2018-10-29 08:29:43 +00:00
Rishi Solanki cfef87d6f1 Improved: Remove empty field values from xml data files so that it will not override existing data with empty values. Removed all empty data fields from data files.
(OFBIZ-10282)
Thanks to Arun Patidar for reporting and review.
Thanks to Suraj Khurana for providing patch for the improvement.
Thanks to Jacques for discussion and finalizing the work.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830545 13f79535-47bb-0310-9956-ffa450edef68
2018-04-30 10:52:55 +00:00
Rishi Solanki b8889e7f6f Improved: Move all data in applications to the datamodel component. Removed unused files as no data in it.
(OFBIZ-9501)
Thanks Sourabh Jain for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823182 13f79535-47bb-0310-9956-ffa450edef68
2018-02-05 14:39:43 +00:00
Rishi Solanki 5a49b98d3a Improved: Move all data in applications to the datamodel component. Moved demo data from accounting, commonext, content, humanres, manufacturing, marketing, order, party, product, workeffort components to datamodel component. Done changes in related data files and do entries accordingly.
(OFBIZ-9501)
Thanks to Sourabh Jain for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823177 13f79535-47bb-0310-9956-ffa450edef68
2018-02-05 14:13:04 +00:00
James Yong b2004efd5a Improved: ID should be the abbreviation for identity in English
(OFBIZ-100131)

Cover translations that are missed earlier.
Also cover non-English translations.

Thanks: Jacques for the additional patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820451 13f79535-47bb-0310-9956-ffa450edef68
2018-01-07 12:16:21 +00:00
Rishi Solanki fbdf5e9416 Improved: Move all data in applications to the datamodel component. Removed unused files.
(OFBIZ-9501)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818386 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 11:44:53 +00:00
Rishi Solanki 613a605a3f Improved: Move all data in applications to the datamodel component. Moved seed data from commonext component. Left the protlet, security and help data.
(OFBIZ-9501)
Thanks to Jacques and Taher for your help and finalizing the directions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818385 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 11:39:52 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Jacques Le Roux 5d4f865cd2 Fixed: ofbizsetup cannot create first customer. problem with state/province
dropdown
(OFBIZ-6054)

Load only seed and seed-initial
Go to url. https://localhost:8443/ofbizsetup/control/firstcustomer

When entering the postal address, the state/province dropdown is empty and 
remains empty regardless of selection of the country dropdown.

Thanks: Wai for report and Oleg Andreyev for patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813833 13f79535-47bb-0310-9956-ffa450edef68
2017-10-30 22:06:33 +00:00
Jacques Le Roux bf43edbdeb No functional change
Changes the OFBiz logo file name as it has been changed in the site



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813480 13f79535-47bb-0310-9956-ffa450edef68
2017-10-27 08:11:12 +00:00