Commit Graph
9653 Commits
Author SHA1 Message Date
Jacques Le Roux 6207c23328 "Applied fix from trunk for revision: 1862207"
------------------------------------------------------------------------
r1862207 | jleroux | 2019-06-27 14:03:21 +0200 (jeu. 27 juin 2019) | 8 lignes

Fixed: Export XML data, ,o proper error message displayed if user misses to 
select entities 
(OFBIZ-11125)

No Proper error message is displayed if user misses to select entities from the 
list, and throw error message

Thanks: Jayansh Shinde
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862208 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 12:03:53 +00:00
Jacques Le Roux 371fc2f9c6 "Applied fix from trunk for revision: 1862046"
------------------------------------------------------------------------
r1862046 | jleroux | 2019-06-25 11:44:54 +0200 (mar. 25 juin 2019) | 1 ligne

Reverted: it was not supposed to be committed, "wrong button" while backporting
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862047 13f79535-47bb-0310-9956-ffa450edef68
2019-06-25 09:48:27 +00:00
Nicolas Malin 5e01d49a4e Fixed: Backport: Decrypt a field on embedded entity-view failed
(OFBIZ-11078)

When you tried to decrypt a field present on embedded entity-view, key use is the view name and not the final entity who contains this field.

You currently have the problem on PartyContactMechDetail where if you want to displaying the ftpPassword for a FtpAddress, the view failed and tried to use ContactMechDetail to decrypt instead of FtpAddress

To solve it, we iterate on the entity contains the field in the view while is an entity-view :

    PartyContactMechDetail.ftpPassword
         -> ContactMechDetail.ftpPassword
              -> FtpAddress.ftpPassword
                   -> key found FtpAddress

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860366 13f79535-47bb-0310-9956-ffa450edef68
2019-05-29 18:54:04 +00:00
Jacques Le Roux d06ad50f70 "Applied fix from trunk for revision: 1859972"
------------------------------------------------------------------------
r1859972 | jleroux | 2019-05-25 16:08:48 +0200 (sam. 25 mai 2019) | 12 lignes

Fixed: Duplicate entries in paramWithSuffix
(OFBIZ-11056)

when using string-list-suffix attribute for service definition, invoke method 
(from associated event handler) will try to parse parameters from both request 
variable and rawParameterMap which was also built from request. 
So we end up with duplicates in resulting list.

This behaviour seems to be introduced with OFBIZ-5048.


Thanks: Samuel Trégouët for report and fix 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859973 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:10:46 +00:00
Jacques Le Roux 8f76ba6c67 "Applied fix from trunk for revision: 1859968"
------------------------------------------------------------------------
r1859968 | jleroux | 2019-05-25 15:25:34 +0200 (sam. 25 mai 2019) | 16 lignes

Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

The testCreateNewRequest was failing due to escaped single quotes in related
data in OrderTypeData.xml:
subject="OFBiz - Your Request is received: '${custRequestName}' #CR${custRequestId}"

This was a peculiar case that could be generalised to all escapable characters.
The general solution is to compare the original value with the filtered value 
unescaped in UtilCodec::checkStringForHtmlSafe.
BTW, weirdly enough StringEscapeUtils::escapeHtml4 does not escape single quote.

Another weirdness is the test was passing with plugins data loaded. This is due
to duplicated demo data in scrumTypeData.xml (which is actually not only type
data, as ever the scrum component is a mess, that's not new and always wonder
if we should not get rid of it!)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859969 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 13:34:45 +00:00
Suraj Khurana d63e7d20ec Applied fix from trunk for revision: 1859915
===

Fixed: Enable entity timestamp fields.
(OFBIZ-10959)
While working on a Production environment, it is found that for some reason entity timestamp fields are disabled at Search Results screen in Trunk and the previous release branch.

Thanks Pawan Verma for reporting the issue and providing the patch, Jacques, Gil, Mathieu for reviewing it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859916 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:27:34 +00:00
Nicolas Malin 30f2125894 Fixed: Backport: Manage EECAs on delegator.removeBy
(OFBIZ-11040)
When you delete some entities through removeByAnd or removeByCondition, eeca aren't enable and the remove is quite as regard implemented rules.
With
        <eca entity=GoodIndentification operation=create-store-remove event=return>
             <action service=indexProductKeywords mode=sync/>
        </eca>
And
        delegator.removeByAnd('GoodIdentification', [productId: 'WG-1111'])

The service indexProductKeywords wasn't call for the productId WG-1111

To solve this situation, the idea would be delegator.removeValue for each element to delete when an eeca is present otherwise call the standard helper.removeByCondition.

Thanks to Leila Mekika for raise and fix this issue, Jacques Leroux and Mathieu Lirzin for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859888 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 15:08:22 +00:00
Jacques Le Roux 17e47b6730 "Applied fix from trunk for revision: 1859882"
------------------------------------------------------------------------
r1859882 | jleroux | 2019-05-24 16:16:39 +0200 (ven. 24 mai 2019) | 5 lignes

Improved: no functional change

Javadoc was unhappy: 
CustomPermissivePolicy.java:13: error: element not closed: blockquote

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859883 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 14:17:04 +00:00
Jacques Le Roux daa2c243a9 "Applied fix from trunk for revision: 1859877"
------------------------------------------------------------------------
r1859877 | jleroux | 2019-05-24 15:47:08 +0200 (ven. 24 mai 2019) | 10 lignes

Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

This was reopened after discussion at 
https://markmail.org/message/jnaitmwahjcjmdn5

This is a new solution which follows the work done with OFBIZ-6669 and OFBIZ-10187
Roughly said, it uses org.owasp.html.PolicyFactory and org.owasp.html.Sanitizers

Thanks: Christoph Neuroth for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859878 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:51:26 +00:00
Jacques Le Roux d347fa1d62 "Applied fix from trunk for revision: 1859871"
------------------------------------------------------------------------
r1859871 | jleroux | 2019-05-24 15:24:31 +0200 (ven. 24 mai 2019) | 14 lignes

Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

After a discussion with Dennis, I checked and the pattern ONSITE_URL would be 
useless without 

.allowAttributes("background").matching(ONSITE_URL)
.onElements("table")
.allowAttributes("background").matching(ONSITE_URL)
.onElements("td", "th", "tr")

So here they are

Thanks: Dennis Balkir for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859872 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:27:35 +00:00
Jacques Le Roux c335f3187d "Applied fix from trunk for revision: 1859800"
------------------------------------------------------------------------
r1859800 | jleroux | 2019-05-23 18:36:37 +0200 (jeu. 23 mai 2019) | 8 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

Reverts all the rest from r1816180, and, after reading carefully the code used 
for "request-redirect" in RequestHandler (and downward), fixes the documentation 
in site-conf.xsd

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859801 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:37:34 +00:00
Jacques Le Roux acaeedb53a "Applied fix from trunk for revision: 1859735 "
------------------------------------------------------------------------
r1859735 | jleroux | 2019-05-22 18:41:04 +0200 (mer. 22 mai 2019) | 12 lignes

Fixed: massPrintOrders service does not work
(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859736 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 16:41:45 +00:00
Nicolas Malin 1fb06865a1 Fixed: Backport: Incorrect findByCount on DynamicView with groupBy and selected fields
(OFBIZ-11041)

When you create a DynamicView with 'group by' agreggate function and you perform a delegator.findCountByCondition() with selected fields, the result is different from the count of each element returned by delegator.findList().

The problem come from when the 'group by' closure is populated with all grouped by fields from on the DV and not only those from selected fields.

Thanks to Leila Mekika to raise and solve this issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859439 13f79535-47bb-0310-9956-ffa450edef68
2019-05-17 15:48:46 +00:00
Mathieu Lirzin 4fd92eea61 Fixed: Fix javadoc build for OpenJDK 11
(OFBIZ-10757)

This removes HTML5 deprecated stuff such as ‘<tt>’ elements, and
‘cellpadding’ table attributes which were breaking the ‘:javadoc’
Gradle task when using OpenJDK 11.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859124 13f79535-47bb-0310-9956-ffa450edef68
2019-05-11 20:40:37 +00:00
Jacques Le Roux 20f97a5f56 "Applied fix from trunk for revision: 1859055 "
------------------------------------------------------------------------
r1859055 | jleroux | 2019-05-10 07:15:28 +0200 (ven. 10 mai 2019) | 4 lignes

Fixed: no functional changes

Fixes typos

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859056 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 05:15:56 +00:00
Jacques Le Roux 8853af74ed "Applied fix from trunk for revision: 1858980 "
------------------------------------------------------------------------
r1858980 | jleroux | 2019-05-09 11:17:08 +0200 (jeu. 09 mai 2019) | 4 lignes

Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

By default we now use a permissive sanitizer policy
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858981 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 09:21:20 +00:00
Jacques Le Roux bdfc43319f "Applied fix from trunk for revision: 1858483"
------------------------------------------------------------------------
r1858483 | mthl | 2019-05-01 14:55:51 +0200 (mer. 01 mai 2019) | 7 lignes

Improved: Remove unneeded generics in ‘MapContextTest’
(OFBIZ-10933)

This is done to remove a warning in OpenJDK 8 which doesn't seem to
handle ‘@safevarargs’ annotation properly when using generics.  This
warning was not present with OpenJDK 11.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858979 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 09:01:19 +00:00
Jacques Le Roux f6206c1774 "Applied fix from trunk for revision: 1858965"
------------------------------------------------------------------------
r1858965 | jleroux | 2019-05-09 08:05:05 +0200 (jeu. 09 mai 2019) | 18 lignes

Fixed: Product content management screen doesn't validate trusted users' input
(OFBIZ-10054)

Steps to recreate:
1) go to (authenticate with admin/ofbiz):
https://localhost:8443/catalog/control/EditProductContent?productId=WG-1111

2) set the content of the field labeled "Large Image" to:
non_existent.foo" onerror="alert('Hi!');

3) visit the url:
https://localhost:8443/ecommerce/control/product?product_id=WG-1111

A popup message will appear with the "Hi!".

jleroux: This is fixed by preventing any js event to be passed 

Thanks: Loris Nardo for report, Jacopo and Gregory for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858966 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 06:05:57 +00:00
Mathieu Lirzin 9ba89ba677 Improved: Rewrite ‘CustomPermissivePolicy#matchesEither’ static method
(OFBIZ-10187)

It now uses a lambda expression instead of an anonymous class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858934 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 17:11:35 +00:00
Mathieu Lirzin c1caad3442 Improved: Add missing ‘synchronized’ modifier
(OFBIZ-11004)

Overriding a synchronized method with a non-synchronized one can
introduce potential runtime concurrency bugs. Since
‘ExtendedProperties#loadFromXML’ is overridding
‘Properties#loadFromXML’ which is synchronized, it is safer to mark it
as synchonized.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858928 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 15:16:59 +00:00
Jacques Le Roux 7752eb62da "Applied fix from trunk for revision: 1857088"
------------------------------------------------------------------------
r1857088 | mthl | 2019-04-08 00:11:53 +0200 (lun. 08 avr. 2019) | 6 lignes

Fixed: Remove redundant interface declaration (OFBIZ-10910)

‘java.io.ObjectInputStream’ already implements the ‘AutoCloseable’
interface, so there is no need to declare it in
‘SafeObjectInputStream’ which extends this class.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858866 13f79535-47bb-0310-9956-ffa450edef68
2019-05-07 15:00:36 +00:00
Michael Brohl bb9d58f13e Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

This makes the sanitizing enabled/disabled by configuration and enhances
the functionality to support custom sanitizer policies. A reasonable 
example policy class is also included.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858353 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:40:15 +00:00
Michael Brohl ef6ec58bb6 Applied fix from trunk for revision: 1858347
===

Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The default host is now retrieved using the API instead of simply
retrieving the 1st host through Tomcat.getHost().


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858348 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 08:48:54 +00:00
Jacques Le Roux 6de3a2e4e5 "Applied fix from trunk for revision: 1858180"
------------------------------------------------------------------------
r1858180 | jleroux | 2019-04-26 10:33:30 +0200 (ven. 26 avr. 2019) | 17 lignes

Reverted: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

Partially revert r1858094, just replaces "rmaps == null" by "rmaps.isEmpty()"

As Mathieu mentioned in dev:
<<Checking for ‘null’ here is not a solution since ‘resolveURI’ contract
it to return a non-nullable collection.
This commit is only bypassing the error handling.>>

As I said in r1858094:
<<This has been somehow broken by OFBIZ-10438 but actually it was already broken 
before but not for the same reason.>>

We need now to review/check how it worked in R15 where it's OK, and possibly 
implements the same
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858181 13f79535-47bb-0310-9956-ffa450edef68
2019-04-26 08:34:36 +00:00
Jacques Le Roux 7d5cb68a09 "Applied fix from trunk for revision: 1858092"
------------------------------------------------------------------------
r1858092 | jleroux | 2019-04-25 10:25:30 +0200 (jeu. 25 avr. 2019) | 14 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be called 
directly.
(OFBIZ-10895)

This has been somehow broken by OFBIZ-10438 but actually it was already broken 
before but not for the same reason. Finally r1838081 (for OFBIZ-10438) allows to 
easy fix it when in previous versions (pre R18) it would need another fix. 
Since it's only annoying text in log I'll let users search the solution for 
pre R18 versions and will fix it only for trunk and R18.

Replaces rmaps.isEmpty() by rmaps == null as it was before R16 (R15 has not this
issue)
Also includes Eclipse automated imports sorting

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858094 13f79535-47bb-0310-9956-ffa450edef68
2019-04-25 08:26:07 +00:00
Swapnil Mane 626fb28672 Applied fix from trunk for revision: 1858035
===

Fixed: Parameters are not available to the next response type when form of enctype=multipart/form-data type is submitted
(OFBIZ-10833)

Reason: The UtilHttp.getMultiPartParameterMap method is used to get the parameters in case of multipart/form-data type.
The getMultiPartParameterMap parse the request to get the parameters.

{code}
uploadedItems = UtilGenerics.<FileItem>checkList(upload.parseRequest(request));
{code}

As per the Apache commons-fileupload guideline, a request can only be parsed once [1]. So, for the next response, again the same getMultiPartParameterMap method is executed (with the same request object), and no parameters are found, since, the request is already parsed.

Also, have a look at the StackOverflow question [2], it also contains related information.

Fix for the issue:
Set the consumed parameters (except uploaded file(s)) in the request attribute so that it will be available to the next response.
The uploaded file(s) are not set in request attribute again to avoid unnecessary memory consumption, also it makes no sense to traverse the uploaded file in the request.

[1] http://commons.apache.org/proper/commons-fileupload/faq.html#empty-parse

[2] https://stackoverflow.com/questions/13881272/servletfileuploadparserequestrequest-returns-an-empty-list

Thanks: Ingo Wolfmayr for reporting issue and Jacques Le Roux for review.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858036 13f79535-47bb-0310-9956-ffa450edef68
2019-04-24 10:05:12 +00:00
Gil Portenseigne b953755bc6 Fixed: User depersonation do not clean out impersonated user session.
(OFBIZ-10942)

Thank you Leila Mekika for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857992 13f79535-47bb-0310-9956-ffa450edef68
2019-04-23 07:31:29 +00:00
Mathieu Lirzin 50310c5703 Fixed: Ensure that ‘MapContext’ preserves insertion order properties
(OFBIZ-10933)

This fixes a regression introduced in revision 1837462.

When pushing a ‘LinkedHashMap’ inside a ‘MapContext’, the iteration
order of the ‘MapContext’ values was not corresponding to the
insertion order of the embedded ‘LinkedHashMap’ which is important in
the ‘ControllerConfig’ case where configuration elements are stored in
‘LinkedHashMap’ objects and the ‘include’ mechanism relies on
‘MapContext’.

To avoid such regression in the future, a test reproducing the bug has
been added.

Thanks: Gil Portenseigne for investigating.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857820 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 15:29:52 +00:00
Mathieu Lirzin b8f0d689d1 Improved: Add ‘UtilMisc#toMap(Supplier<Map<K, V>>, Object...)’
(OFBIZ-10933)

It is convenient to use ‘UtilMisc#toMap’ to create pseudo-literal
maps. Previously it was not possible to specify the concrete class of
the constructed map.  The ‘UtilMisc#toMap(Supplier<Map<K, V>>,
Object...)’ overload now provides a convenient way to instantiate
specific map types like ‘LinkedHashMap’ objects.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857819 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 15:26:54 +00:00
Jacques Le Roux cbab9e6a45 "Applied fix from trunk for revision: 1857099"
------------------------------------------------------------------------
r1857099 | jleroux | 2019-04-08 11:17:55 +0200 (lun. 08 avr. 2019) | 12 lignes

Improved: Using try-with-resources with File IO Objects.
(OFBIZ-9855)

Uses try with resources for File IO objects like ObjectInputStream and other 
objects. File classes have the AutoCloseable interface.

jleroux: this is only a part of the 2nd patch. The 1st patch will be committed
soon too...

All tests pass

Thanks: Pradhan Yash Sharma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857486 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 17:50:10 +00:00
Jacques Le Roux 07445e768d "Applied fix from trunk for revision: 1857392 "
------------------------------------------------------------------------
r1857392 | jleroux | 2019-04-12 11:29:03 +0200 (ven. 12 avr. 2019) | 14 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

Cleans and simplifies things in UtilObject.java and also handles patterns. 
That's what we missed most when needing to update.

Fixes typos in SafeObjectInputStream class and add a commented line for a WIP in
resolveProxyClass method

Also includes work done in UtilObject.java for OFBIZ-9855 
"Using try-with-resources with File IO Objects."



------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857393 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 09:29:47 +00:00
Jacques Le Roux 5792a6b13f "Applied fix from trunk for revision: 1856667 "
------------------------------------------------------------------------
r1856667 | jleroux | 2019-03-31 11:14:16 +0200 (dim. 31 mars 2019) | 10 lignes

Fixed: EmailServices.sendMail causes a NPE, when sendFrom is missing
(OFBIZ-10706)

I tried to find the history for why the service does not take the 
defaultFromEmailAddress property from general.properties and I found that It was 
last modified in revision r418498 on 02/07/2006, I think it was always broken.

This uses defaultFromEmailAddress property in sendMail if sendFrom is missing

Thanks: Benjanmin Jugl reported, Pawan Verma fixed and others for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856668 13f79535-47bb-0310-9956-ffa450edef68
2019-03-31 09:16:51 +00:00
Swapnil Mane 92da7eed06 Applied fix from trunk for revision: 1856598
===

Fixed: Missing oldStatusId in error when no status valid change record found
(OFBIZ-10377)

In the case of entity auto service, when an invalid status change is performed, the error message doesn't show the current status of the item from which the user is changing the status.

Thanks:  Lalit Dashora for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856599 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 05:47:34 +00:00
Jacques Le Roux afe6e8ad20 "Applied fix from trunk for revision: 1856484"
------------------------------------------------------------------------
r1856484 | jleroux | 2019-03-28 16:36:13 +0100 (jeu. 28 mars 2019) | 13 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Ed Mack
This adds 
org.apache.ofbiz.widget.model.ModelTheme
java.util.Collections 
java.util.LinkedList 
java.util.ArrayList
java.util.TimeZonz


Thanks: Ed Mack at OFBIZ-10876
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856485 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 15:37:07 +00:00
Jacques Le Roux d3669f8166 "Applied fix from trunk for revision: 1856460"
------------------------------------------------------------------------
r1856460 | jleroux | 2019-03-28 09:30:21 +0100 (jeu. 28 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

There was a recurring typo in previous commit.
For arrays of primitives it should be 
"\\[Z","\\[B","\\[S","\\[I","\\[J","\\[F","\\[D","\\[C"
and not 
"[Z","[B","[S","[I","[J","[F","[D","[C"
It shows how tired I'm :/

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856461 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 08:30:57 +00:00
Jacques Le Roux 2f39797e50 "Applied fix from trunk for revision: 1856455"
------------------------------------------------------------------------
r1856455 | jleroux | 2019-03-28 08:50:32 +0100 (jeu. 28 mars 2019) | 7 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Ed Mack
This adds all arrays of primitives and java.math.BigDecimal 

Thanks: Ed Mack at OFBIZ-10876
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856456 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 07:52:06 +00:00
Jacques Le Roux 181da99a6a "Applied fix from trunk for revision: 1856405"
------------------------------------------------------------------------
r1856405 | jleroux | 2019-03-27 15:16:24 +0100 (mer. 27 mars 2019) | 12 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.math.BigDecimal and "[B" (ie [B == byte[] and I don't understand
why in this case "byte[]" does not work)

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Ingo Wolfmayr at OFBIZ-10870
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856406 13f79535-47bb-0310-9956-ffa450edef68
2019-03-27 14:25:01 +00:00
Swapnil Mane fe50928e44 Applied fix from trunk for revision: 1855898
===

Improved: Moved the nodeType check after node.getTextContent() method call
(OFBIZ-10832)

Since most nodes will contain text then it will be more efficient to do a null check after retrieving nodeValue.

Thanks: Scott for your valuable inputs.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855899 13f79535-47bb-0310-9956-ffa450edef68
2019-03-20 12:17:51 +00:00
Deepak Dixit 4117e0580d Applied fix from trunk for revision: 1855497
===

Reverted: Changes done at r#1854306, Removed the extra space from CommonBranch uiLabel values


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855498 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 09:26:30 +00:00
Jacques Le Roux 8badcf709b "Applied fix from trunk for revision: 1855492"
------------------------------------------------------------------------
r1855492 | jleroux | 2019-03-14 09:28:27 +0100 (jeu. 14 mars 2019) | 11 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.util.Date

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Wolfgang Rauchholz
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855493 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 08:28:47 +00:00
Jacques Le Roux f772c0596d "Applied fix from trunk for revision: 1855488"
------------------------------------------------------------------------
r1855488 | jleroux | 2019-03-14 08:42:17 +0100 (jeu. 14 mars 2019) | 11 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.sql.Timestamp

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Wolfgang Rauchholz
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855489 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 07:43:15 +00:00
Swapnil Mane f01e4cf67c Applied fix from trunk for revision: 1855403
===

Fixed: simpleTypeConvert always returns Null for Document, Document Type and Notation Node 
(OFBIZ-10832)

As per the code, getTextContent() method is used get text content of the node and its descendants but the node.getTextContent() always return Null for the following Node type
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE [1]

Since we can't get the text value of Document, Document Type and Notation Node, thus simply return the same object.

[1] https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Node.html#getTextContent()

Thanks: Deepak Dixit for reviewing the code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855408 13f79535-47bb-0310-9956-ffa450edef68
2019-03-13 12:34:45 +00:00
Jacques Le Roux 8dc982f2b3 "Applied fix from trunk for revision: 1855371"
------------------------------------------------------------------------
r1855371 | jleroux | 2019-03-13 09:19:32 +0100 (mer. 13 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Deepak at OFBIZ-10837
This adds sun.util.calendar.ZoneInfo

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Deepak Dexit
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855372 13f79535-47bb-0310-9956-ffa450edef68
2019-03-13 08:20:02 +00:00
Jacques Le Roux cd6625491b "Applied fix from trunk for revision: 1855287"
------------------------------------------------------------------------
r1855287 | jleroux | 2019-03-12 09:29:37 +0100 (mar. 12 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Rohit at OFBIZ-10573
This adds FlexibleStringExpander

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Rohit Koushal
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855288 13f79535-47bb-0310-9956-ffa450edef68
2019-03-12 08:30:01 +00:00
Deepak Dixit adeac89d37 Applied fix from trunk for revision: 1854683
===

Preparation for JDK11 update, Updated following code to fix warning with respect to JDK11
- Replaced Class::newInstance occurrences
- Removed deprecated override method Object::finalize
(OFBIZ-10757)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1854689 13f79535-47bb-0310-9956-ffa450edef68
2019-03-03 10:45:02 +00:00
Jacques Le Roux 2e4cd0330a "Applied fix from trunk for revision: 1854306"
------------------------------------------------------------------------
r1854306 | jleroux | 2019-02-25 11:33:53 +0100 (lun. 25 févr. 2019) | 6 lignes

Improved: no functional change

A missing space before CommonBranch label made the word trunkbranch instead of
trunk branch.

I'll backport this
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1854307 13f79535-47bb-0310-9956-ffa450edef68
2019-02-25 10:40:47 +00:00
Jacques Le Roux bd35056b3f "Applied fix from trunk for revision: 1853745 "
------------------------------------------------------------------------
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
2019-02-17 12:39:54 +00:00
Jacques Le Roux b9480dae29 "Applied fix from trunk for revision: 1853691 "
------------------------------------------------------------------------
r1853691 | jleroux | 2019-02-16 10:42:03 +0100 (sam. 16 févr. 2019) | 9 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

As reported by FindBugs and Sonar, it's troubling (a Bad practice in Sonar[1], 
a code smell in Findbugs[2]) when extending to use the same name than the 
extended Object

[1] https://sbforge.org/sonar/rules/show/findbugs:NM_SAME_SIMPLE_NAME_AS_SUPERCLASS?layout=false
[2] https://logging.apache.org/log4j/log4j-2.2/log4j-jul/findbugs.html
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1853692 13f79535-47bb-0310-9956-ffa450edef68
2019-02-16 09:43:39 +00:00
Michael Brohl be5f4bddb6 Applied fix from trunk for revision: 1852882
===

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
2019-02-04 09:26:42 +00:00
Michael Brohl 8bdb9c4945 Applied fix from trunk for revision: 1849931
===

Improved: Token Based Authentication
(OFBIZ-9833)

Just few typos and import ordering while reviewing for OFBIZ-4361


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852883 13f79535-47bb-0310-9956-ffa450edef68
2019-02-04 09:26:12 +00:00