------------------------------------------------------------------------
r1853745 | jleroux | 2019-02-17 13:38:06 +0100 (dim. 17 févr. 2019) | 8 lignes
Improved: Improve ObjectInputStream class
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list I used was not complete.
This adds "java.util.HashMap", "Boolean", "Number", "Integer" which are the ones
missing I found so far.
Maybe other classes could still miss OOTB. So I added a warning in
SafeObjectInputStream::resolveClass
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1853746 13f79535-47bb-0310-9956-ffa450edef68
===
Fixed: Error parsing JWT
(OFBIZ-10814)
Fixes incorrect retrieval of the Authorization header JWT token.
Fixes wrong API usage for the key parameter which assumed the key is
provided in BAS64 format.
Refactored the code to use helper methods for key and auth header
retrieval.
Javadoc corrections and enhancements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852884 13f79535-47bb-0310-9956-ffa450edef68
===
Fixed: Services of EntitySync Push and Pull functionalities
(OFBIZ-10818)
Set transaction timeout of 2hrs for the actual data transmission services.
Removed unwanted service updateEntitySyncRunning
Called the tracking and status update services in new transaction so that record can be maintain after current transaction rollback
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852680 13f79535-47bb-0310-9956-ffa450edef68
Backport from trunk
When OFBiz render a platform specific with a ftl template file, the widget verbosity throw function ModelWidget.widgetBoundary() was called with parameters as context. However this function control if a parameters is already present, so if you set a context.widgetVerbose = false, is was ignored and widget verbosity was present for ftl rendering.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852533 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1851998 | jleroux | 2019-01-24 09:17:38 +0100 (jeu. 24 janv. 2019) | 11 lignes
Fixed: Impossible secure and autologin cookie names when mountpoint contains a
slash inside its name
(OFBIZ-10766)
Deepak Nigam reported on dev ML:
When there is one web app with the empty mount point (i.e. deployed on root),
the auto-login cookie will not work for that particular webapp due to the change
in the path of the cookie from "/" to "/" + applicationName. Because the system
will try to find the cookie at the "/" but it is actually at "/" + applicationName.
Thanks Deepak for report
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851999 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1851350 | jleroux | 2019-01-15 14:48:33 +0100 (mar. 15 janv. 2019) | 7 lignes
Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)
As reported by Deepak Nigam on dev ML there was a risk of NPE with userLogin w/
my last commit at r1851074
Thanks Deepak for the report and proposed fix
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851351 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1851247 | jleroux | 2019-01-14 14:53:18 +0100 (lun. 14 janv. 2019) | 13 lignes
Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)
On further investigation, I found that cookie path and domain are different
in the methods of creating the auto-login cookie i.e. LoginWorker.autoLoginSet()
and removing the auto-login cookie i.e. LoginWorker.autoLoginRemove().
After following changes the issue seems to be fixed:
1. Removed getMaxAge() check from the condition used in
LoginWorker.getAutoUserLoginId() method.
2. Corrected the path and domain in the method LoginWorker.autoLoginRemove().
Thanks: Deepak Nigam for discussion and fix
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851248 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1851200 | jleroux | 2019-01-13 14:31:13 +0100 (dim. 13 janv. 2019) | 11 lignes
Reverted: Impossible secure and autologin cookie names when mountpoint contains
a slash inside its name
(OFBIZ-10766)
In my previous commit I reverted the initial change. As I said in the Jira
I had a second look and it's better to fix the problem at the root as I did
initially.
I wrote in my previous commit: "This method is used in other places where the
name should not be changed." I checked there are no issues changing slashes to
underscores in the cookies names anywhere.
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851201 13f79535-47bb-0310-9956-ffa450edef68
===
Fixed: Errors and warnings in webtools' ArtifactInfo
(OFBIZ-10760)
This fixes an engine declaration mistake introduced in OFBIZ-9111,
removes an unused service which should have been deleted in OFBIZ-8722
and removes unused services which should have been deleted in
OFBIZ-10146.
Thanks Mathieu Lirzin for reporting and providing the patches.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851159 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1851074 | jleroux | 2019-01-11 17:26:13 +0100 (ven. 11 janv. 2019) | 17 lignes
Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)
In the method to set the autoLogin cookie, LoginWorker::autoLoginSet,
system fetches the webAppInfo by using the
method ComponentConfig::getWebappInfo. In this method, serverId and
applicationName are passed as arguments.
*WebappInfo webappInfo = ComponentConfig.getWebappInfo((String)
context.getAttribute("_serverId"), UtilHttp.getApplicationName(request));*
If the mount-point of the web app is set as an empty string, then 'root'
will be used as the application name, due to which the object webAppInfo
will come null. If the webAppInfo is null then the autoLogin cookie will
not be created and added to the response object by the system.
Thanks: Aditya for report and Mathieu Lirzin for discussion
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851075 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1851068 | jleroux | 2019-01-11 17:12:01 +0100 (ven. 11 janv. 2019) | 12 lignes
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/branches/release18.12@1851070 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1850694 | jleroux | 2019-01-07 22:58:01 +0100 (lun. 07 janv. 2019) | 13 lignes
Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)
Michael spotted that I used "default-server" in r1845558:
Quoting him:
It only works for webapps using "default-server". This name is configurable
in the ofbiz-component.xml and and should not be hard-coded in the code.
This fixes it
Thanks: Michael Brohl
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850695 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1850685 | jleroux | 2019-01-07 21:37:10 +0100 (lun. 07 janv. 2019) | 8 lignes
Fixed: Impossible secure and autologin cookie names when mountpoint contains a
slash inside its name
(OFBIZ-10766)
My previous commit was wrong this one fixes it.
I made a mistake trying to generalise changing UtilHttp::getApplicationName.
This method is used in other places where the name should not be changed.
Only cookies are concerned.
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850686 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1850530 | jleroux | 2019-01-06 09:40:38 +0100 (dim. 06 janv. 2019) | 8 lignes
Fixed: Impossible secure and autologin cookie names when mountpoint contains a
slash inside its name
(OFBIZ-10766)
When you set a mountpoint which contains a slash inside its name
(ie not only a slash as a trailer, which is possible), as it's needed with
OFBIZ-10765, OFBiz tries to create a cookie with a slash in its name and
that's impossible
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850531 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1850015 | jleroux | 2018-12-31 07:38:36 +0100 (lun. 31 déc. 2018) | 16 lignes
Improved: Prepare the migration to XStream 1.5
(OFBIZ-10756)
Fixes CVE-2018-17200
We currently use the UnsupportedClassConverter method in UtilXml class.
When the 1.5 version of XStream will be available another way to handle this
kind of things will be available and used by default. It's already possible to
use the same with the 1.4 version of XStream with its setupDefaultSecurity method.
So this replaces the UnsupportedClassConverter in UtilXml class by
XStream::setupDefaultSecurity method.
It's an improvement but better to backport it as much as possible
The UtilXmlTests class and its use is removed and the UnsupportedClassConverter
method deprecated (no use OOTB)
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850018 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.
Improves code in methods:
isPrimaryKey() of GenericEntity
hasNext() and hasPrevious() of EntityListIterator
isValueActive() of EntityUtil
Additional change:
Improved return for getStartIndexFromViewIndex() method in EntityUtil. Instead of using if-else block, a ternary operator is used for improving readability.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849741 13f79535-47bb-0310-9956-ffa450edef68
EntityQuery
(OFBIZ-9890)
queryList() and queryFirst() both call internal private query() method.
This method calls delegator.findList if a normal Entity/ViewEntity is used
(not a DVE).
DVE has no option to include a having condition and so must opt to use
queryIterator(). Even queryCount() can use a having condition.
Thanks: Rupert Howell and Gareth Carter for report, Prakhar Kumar for discussion
and Gareth Carter for the fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849693 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10728)
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.
Improves code in isGiftCard().
Thanks Suraj Khurana for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849673 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10721)
stats related entities foreign key relation has been removed by Jacopo at r#1647271 and new group org.apache.ofbiz.stats introduced for stats related entity. Some remnants were still left in stats entities.
Removed relations of Party, ContactMech and Content from ServerHit entity.
Removed relations of Content from ServerHitBin entity.
Removed relations of UserLogin from Visitor entity.
Thanks Jacques Le Roux and Deepak Dixit for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849275 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10712)
We have checkAuth method in service dispatcher class, this method performs multiple auth related check.
if all checks passed it call the modelService.makeValid method to prepare service context (line#960) but this code executed only when service definition has a permission service call.
If service does not have any permission service call then it does not call the modelService.makeValid and this may cause the service validation issue unknown parameter found.
Ideally modelService.makeValid should call irrespective to permission service check.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849193 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10722)
When we have more than one form, in a screen, that use a date-find field,
the second date-find picker is not working.
To reproduce, you can add a new form with a date-find and call it below
FindInvoices in FindInvoices screen
Then load page [https://localhost:8443/accounting/control/findInvoices] .
You should see that there is no picker on the second date-find
The patch adds an id that allow renderDateFindField macro script to work for
both fields
Thanks: Leila Mekika
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849165 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10711)
Due to r1848673 for "Fix or Silence various warnings" (OFBIZ-10701)
a try-with-resources was used but the Object passed in context (an
EntityListIterator) should not be close there. It's reused in
FindGeneric.groovy:107 by a performFind service defined in the
dynamicAutoEntityFieldListForm String.
Thanks: Deepak Dixit for report.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848954 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10709)
LoginWorker.autoLoginCheck does not check if the attribute "autoUserLogin" is
not already filled and executes even if it is not needed. A check on the
attribute beforehand can improve performance significantly.
Thanks: Benjamin Jugl
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848926 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-3844)
The CommonRate label is currently not used coherently throughout the application
stack. The existing translations suggest that the commonly understood meaning of
CommonRate is a rate as a tariff or day rate. However, in the product management
GUI, the CommonRate label is used to demark the section where ProductRating
setting are made.
The provided fix splits CommonRate into two labels, CommonRatioRate and
CommonAssessRate (product rating). Also, the application/product/webapp/ form
definition now references the CommonAssessRate label.
Thanks: Carsten Schinzer for report and patch, Adrian for suggestion and Markus
May for discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848834 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10701)
In order to detect potential issues early, the linting compiler option should be
used by default and disabled with {{./gradlew -PXlint:none build}}.
Additionally it is important to reduce the number of warnings otherwise new
warnings will remain unnoticed.
The warning related to the com.googlecode.concurrentlinkedhashmap dependency
should resolves itself once we handle upgrade to Caffeine like proposed in
OFBIZ-6747.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10488)
Since Java 8 it is possible to instantiate functional interfaces
(interfaces with one non-static method) with lambda expressions instead
of anonymous classes.
This replaces the creation of callable objects with lambda expressions.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848514 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10330)
The Log-Level of the Message "Could not find visit value object in
session..." is changed from "warning" to "info".
Thanks Benjamin Jugl for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848467 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10533)
The TemporalExpression for "MIDNIGHT_DAILY" has to be loaded as seed
data instead of initial-seed data to be available for other seed-initial
usages of this TemporalExpression.
The fix moves this TemporalExpression to the other TemporalExpression
seed data in ServiceSeedData.xml.
Thanks Martin Becker for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848449 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10666)
Steps to regenerate:
Open URL: https://demo-trunk.ofbiz.apache.org/ecommerce/control/main.
Welcome is displayed and user's name is not displayed when URL is opened.
Login at ecommerce, username will be displayed after user logs in.
Logout of ecommerce by clicking on logout. User will be logged out and login
link will be displayed in place of logout link, but the name of user is still
displayed.
Actual: Username is still displayed after user logs out
Expected: Username should not be displayed after the user logs out
Note: Similar issue also exists when the user clicks on (Not You?) link.
Thanks: Arpit Mor for detailled report, Deepak Dixit for discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848398 13f79535-47bb-0310-9956-ffa450edef68