Commit Graph
27737 Commits
Author SHA1 Message Date
Jacques Le Roux 062fc40579 Fixed: CommonTheme has a dependency on Flatgrey application.js
(OFBIZ-11466)

In theme.xml of common-theme there is a reference to application.js residing in
the Flatgrey theme. This should not be. The file should be in common-theme.

Thanks: Pierre Smits for report and fix. I have just also removed
rainbowstone/js/application.js since it's now in common-theme
2020-03-21 11:31:55 +01:00
Daniel Watford a769aaf5fd Improved: Ensure MacroFormRenderer uses
ModelFormField#getCurrentContainerId rather than
ModelFormField#getIdName to ensure any FlexibleStringExpander expression
defined in the field's id-name property is processed before rendering
into the container FTL macro.

(OFBIZ-4035)
2020-03-21 11:31:55 +01:00
Michael Brohl 7fe20b499b Improved: Styles some clickable fields of backend tables as buttons.
(OFBIZ-11309)

Thanks Ulrich Heidfeld for reporting and providing the patch, James Yong
for additional review.
2020-03-21 11:31:55 +01:00
Michael Brohl 89333dfdd8 Fixed: Fixed a bug introduced with the removal of the login security
question.

(OFBIZ-11244)

Thanks Olivier Heintz for reporting and Wiebke Pätzold for providing the
patch.
2020-03-21 11:31:54 +01:00
Dennis Balkir 54a429e8cc Implemented: _WARNING_MESSAGE_
(OFBIZ-10587)

Added warning message as a message type, by adding it in the
messages.ftl and the request-handler

Thanks to Niklas Fallik for reporting
2020-03-21 11:31:54 +01:00
Jacques Le Roux 92d5ad0d00 Improved: no functional change
Follows the "How to apply the Apache License to your work" section at
https://www.apache.org/licenses/LICENSE-2.0

Removes the references to products only used in plugins
2020-03-21 11:31:54 +01:00
Michael Brohl d3907529c3 Implemented: Remove the user login security question.
(OFBIZ-11244)

Thanks Wiebke Pätzold for providing the patch.
2020-03-21 11:31:47 +01:00
Jacques Le Roux 0da38998a9 Improved: Remove unused ‘UtilHttp#checkURLforSpiders’
(OFBIZ-11138)

The "link.remove_lsessionid.user_agent_list" properties was forgotten
2020-03-21 11:31:47 +01:00
Dennis Balkir d0f5a838e8 Fixed: Potential Nullpointer in ErrorPage.ftl
(OFBIZ-11448)

Inserted nullcheck for request-attribute
2020-03-21 11:31:47 +01:00
Nicolas Malin fe4f9cfe00 Improved: Convert PartyServices.xml from mini lang to groovy
(OFBIZ-11361)

Thanks to Leila Mekika for providing the patch
2020-03-21 11:31:47 +01:00
Nicolas Malin 7f10602654 Improved: Convert CommonServices.xml from mini lang to groovy
(OFBIZ-11402)

Thanks to Wiebke Pätzold for providing the patch
2020-03-21 11:31:47 +01:00
Nicolas Malin 0c2a7ee0ef Improved: Convert ProductContentServices.xml mini lang to groovy
(OFBIZ-11436)

Thanks to Sebastian Berg for providing the patch
2020-03-21 11:31:46 +01:00
Michael Brohl e586da62c5 Improved: Upgrade Freemarker from 2.3.29 to 2.3.30.
(OFBIZ-11445)
2020-03-21 11:31:46 +01:00
Gil Portenseigne f951f8da25 Fixed: Convert OrderServices.xml mini-lang to groovyDSL : getNextOrderId
(OFBIZ-9984)
Fix introduced NPE detected by the introduced test.
2020-03-21 11:31:46 +01:00
Gil Portenseigne b999e59b81 Improved: Convert OrderServices.xml mini-lang to groovyDSL : getOrderedSummaryInformation
(OFBIZ-9984)
Thanks Julien for your contribution
2020-03-21 11:31:46 +01:00
Gil Portenseigne 36f9e7792d Improved: Convert OrderServices.xml mini-lang to groovyDSL : getNextOrderId
(OFBIZ-9984)
Thanks Julien for your old patch, it has been improved.
Add a new integration test for the service 'getNextOrderId'
2020-03-21 11:31:46 +01:00
Nicolas Malin 054e66c2ef Improved: Convert createTextAndUploadedContent service from mini-lang to groovy DSL
(OFBIZ-11368)

Thanks to Rohit Hukkeri for providing the patch
2020-03-21 11:31:45 +01:00
Nicolas Malin 312d153aeb Improved: Convert ProductFeatureServices.xml mini lang to groovy
(OFBIZ-11439)

Thanks to Sebastian Berg for providing the patch
2020-03-21 11:31:45 +01:00
Jacques Le Roux f98ed9e9ba Fixed: createMissingCategoryAndProductAltUrls service misses a transaction
(OFBIZ-11441)

Not sure why it had use-transaction="false", makes no sens to me, too old to
check, not a big deal I guess
2020-03-21 11:31:45 +01:00
Nicolas Malin 5d3f85d4e4 Fixed: Convert ProductServices.xml mini lang to groovy: productPriceGenericPermission failed
(OFBIZ-10231)

After groovy conversion the method productPriceGenericPermission failed to validate a user

Problem due to bad call on hasEntityPermission instead of hasPermission
2020-03-21 11:31:45 +01:00
Nicolas Malin 145f53eac3 Improved: Convert ProductServices.xml mini lang to groovy
(OFBIZ-10231)

After groovy conversion the method checkProductRelatedPermission
has been broken for other minilang method that didn't converted.

To solve this problem, I created new permission service checkProductRelatedPermission
and convert all previous minilang method call by a permission service on the related service call
2020-03-21 11:31:45 +01:00
Nicolas Malin cab72ef48d Improved: Convert party/LookupServices.xml mini-lang to groovyDSL
(OFBIZ-11362)

Deprecate lookupParty service by performFindParty and rewrite to work as bridge during the deprecation time
2020-03-21 11:31:45 +01:00
Nicolas Malin 793cf207a0 Fixed: Refactoring permission model call, alone permission service failed
(OFBIZ-11440)

During refactoring (OFBIZ-7113), the service reader used two different methods to read a
permission service definition if is present alone or in a group. For the alone version a link
was missing between the service and the permission service to resolve correctly the permission.

To solve this problem I reorganized to use only one method to initialize a service model permission.

Other point, an attribute renaming was missed : action -> permissionMainAction, when service permission call was called

Last, these problems weren't detected before due to missing unit test on failure service permission, now cover.
2020-03-21 11:31:44 +01:00
Jacques Le Roux 21d568ecdb Fixed: Convert ProductServices.xml mini lang to groovy
Improved: no functional change
(OFBIZ-10231)

ProductServices.xml has been removed while

createProductPrice still refers to an inexisting PriceServices.xml
createProductPrice is not implemented in Groovy, there is no PriceServices.groovy

This just adds it temporarily, waiting for a correct and complete fix
2020-03-21 11:31:44 +01:00
Daniel Watford ca17e2f9ff Improved: Add 2020 version of Incoterms
(OFBIZ-11437)

Alter the parent type and descriptions of existing Incoterm TermTypes to
indicate the version of Incoterms they relate to.

Added new Incoterm TermTypes and descriptions correspoding to the
Incoterms 2020 set.
2020-03-21 11:31:44 +01:00
Jacques Le Roux 2dc7328d09 Improved: Removes getSubContentWithPermCheck and getSubSubContentWithPermCheck
unused services
(OFBIZ-11393)(OFBIZ-11394)

They were introduced by Al Byers in 2007 and, like some other stuff done then
by Al, were never used. We can safely close the 2 related issues as won't do
after removing the 2 services and all the references to them.

Thanks: Priya Sharma
2020-03-21 11:31:44 +01:00
Nicolas Malin 9f9454e385 Fixed: Code refactoring to support groovy syntax
(OFBIZ-10231)

No functional change

This commit contains multiple refactoring to decrease code quantity :
 * use groovy syntax for empty/not empty value
 * use kelvin syntax
 * exploit DSL syntax and EntityQuery as possible
 * refactoring redundant "if block"
 * remove unnecessary transfer variable

Thanks to Gil Portenseigne for help my as his second eye
2020-03-21 11:31:44 +01:00
Nicolas Malin 8d1b3f46fe Improved: Convert PartyInvitationService.xml from minilang to groovy
(OFBIZ-11360)

Thanks to Marie-Aline Pantais for providing the patch.
2020-03-21 11:31:44 +01:00
Daniel Watford 5cf41f2a67 Improved: Set checkstyle to use LF line endings
(OFBIZ-11428)

Setting checkstyle to use LF line endings means that a newline at the
end of a source file is correctly detected no matter whether it is
checked out with LF or CRLF line endings.
2020-03-21 11:31:43 +01:00
Pierre Smits f5f2d459ad Improved: Cleanup HumanRes labels
(OFBIZ-9367)

Removing unused HumanRes labels
2020-03-21 11:31:43 +01:00
Pierre Smits 6c9bdb932a Improved: UI labels
(OFBIZ-9352)

Cleaning up unused labels
2020-03-21 11:31:43 +01:00
Pierre Smits c7f7774e06 Improved: Remove unused labels from ProductUiLabels.xml
(OFBIZ-10551)

Removal of unused labels
2020-03-21 11:31:43 +01:00
Daniel Watford 09b42258d9 Fixed: Fixed line lengths in ModelFormFieldTest to adhere to coding standards
(OFBIZ-11418)
2020-03-21 11:31:42 +01:00
Daniel Watford 59f65f3567 Documented: Documented use of field attribute parameter-name and
lookup field attribute target-parameter in widget-form.xsd

(OFBIZ-11418)
2020-03-21 11:31:42 +01:00
Daniel Watford b770f91a97 Improved: Use FlexibleStringExpander in form widget lookup field field
target parameters

(OFBIZ-11418)

Changed target-parameter attribute of the form widget's Lookup field to
use the FlexibleStringExpander type rather than String. This has been
done to allow reference to other form fields which may have had their
parameter-name attribute set to a FlexibleStringExpander expression.
2020-03-21 11:31:42 +01:00
Jacques Le Roux 11b8d98a8e Improved: Put the TOCs on left in generated AsciiDoc documentation
(OFBIZ-11423)
Following discussions

* AsciiDoc generated online documentation and releases
* New Online Help, need some ideas
threads on dev ML

I propose as suggested Oliver to put TOCs at the left. If I refer to
https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/119
toc: 'left@'
should be put in the main build.gradle

Thanks: Olivier Heintz for the suggestion
2020-03-21 11:31:42 +01:00
Michael Brohl 2f7e675ad6 Fixed: hr-glossary.adoc: line 22: id assigned to block already in use:
ANNUAL_REVENUE

(OFBIZ-11419)

Thanks Olivier Heintz for providing the patch.
2020-03-21 11:31:42 +01:00
Suraj Khurana 39cc830c2f Fixed: Picklist is in Input status even after order is completed.
(OFBIZ-10883)

Thanks Rashi Dhagat for reporting, Shikha Jaiswal for the patch and Pawan Verma for review.
2020-03-21 11:31:42 +01:00
holivier e9a0d113cf Documented: revert remove docbook help files for humanres
(OFBIZ-11420)

Removing Help files in docbook format break the current online help
2020-03-21 11:31:41 +01:00
holivier beac4665ba Documented: revert remove docbook help files for content
(OFBIZ-11420)

Removing Help files in docbook format break the current online help
2020-03-21 11:31:41 +01:00
holivier 0a0ad09ac3 Documented: revert remove docbook help files for commonext-SETUP
(OFBIZ-11420)

Removing Help files in docbook format break the current online help
2020-03-21 11:31:41 +01:00
holivier 19c31f1f9b Documented: revert remove docbook help files for accounting
(OFBIZ-11420)

Removing Help files in docbook format break the current online help
2020-03-21 11:31:41 +01:00
Suraj Khurana c45ed251c1 Improved: Defects reported by code analysis tool.
(OFBIZ-10571)

Following refactoring done -
-- Refactored code to fall in line with some java standards.
-- Based on FindBugs suggestion, refactored some classes to have static nested classes instead of inner class.

Thanks Girish Vasmatkar for reporting the issue and providing the patch.
2020-03-21 11:31:41 +01:00
Jacques Le Roux 6395affe0f Improved: Remove createTopic service (unused)
(OFBIZ-11376)

I could not find any references for this service in the code base, i.e. this
service has not been used anywhere, do we still want to keep it?

Thanks: Devanshu Vyas for report, Priya Sharma for the proposition and the fix
2020-03-21 11:31:40 +01:00
Jacques Le Roux 7d95c46b83 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

Forgot to add UtilHttp::SameSiteFilter
2020-03-20 18:04:31 +01: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
Jacques Le Roux b6a796cbdf Improved: no functional change
Adds "Content-Security-Policy" frame-ancestors="self" in ErrorPage.ftl
Because this page is used as a HTTP 500 error it's more susceptible to
clickjacking

Quoting OWASP ZAP:
This problem still applies to error-type pages (401, 403, 500, etc.), as these
pages are still often affected by injection problems, in which case it is still
possible that browsers may interpret pages differently from their actual content
type.

I tried to work on other file types that were also reported but it's complicated
adn I believe it's not worth it
2020-03-20 10:51:49 +01:00
Jacques Le Roux 2517a96792 Fixed: Propagate the theme in DataResourceWorker.renderDataResourceAsText()
Improved: no functional change

(OFBIZ-9923)

Seems that this has been fixed with OFBIZ-11466 "CommonTheme has a dependency on
Flatgrey application.js"

Thanks: Pierre Smits for the fix in OFBIZ-11466
2020-03-20 09:38:04 +01:00
Nicolas Malin 13ee4cc263 Fixed: Unable to view entity row record in webtools if PK contains timestamp field
(OFBIZ-11426)

This problem came from when the GenericEntity try to store fields value on the map,
If the java type didn't match with the current value type, the function failed and
didn't try to convert it on the wanted type.

Thanks to Pawan Verma and Pierre Smits to raise this issue
2020-03-19 14:44:07 +01:00
Jacques Le Roux 31812009eb Fixed: CommonTheme has a dependency on Flatgrey application.js
(OFBIZ-11466)

In theme.xml of common-theme there is a reference to application.js residing in
the Flatgrey theme. This should not be. The file should be in common-theme.

Thanks: Pierre Smits for report and fix. I have just also removed
rainbowstone/js/application.js since it's now in common-theme
2020-03-19 11:22:09 +01:00