Commit Graph
25851 Commits
Author SHA1 Message Date
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
Suraj Khurana 9b9cdb650e Applied fix from trunk for revision: 1859911
===

Fixed: Issue in order history promotion.
(OFBIZ-10847)
Issue: According to the promotion customer should spend 000 in any 12 months to avail 5% discount. The system is providing the discount even if the customer is not logged in.
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@1859912 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 06:26:30 +00:00
Suraj Khurana 7fcea6f2ef Applied fix from trunk for revision: 1859909
===

Fixed: Drop-ship process behaves incorrectly when a combination of drop-ship and non-drop-ship products are added into the cart.
(OFBIZ-11021)
RequirementMethodEnumId should be decided in the order of property set at ProductStore -> Facility -> Product for each order item which was not working if the non-drop shippable product(s) is added after the drop shippable product(s).

Original Flow: requirementMethodEnumId was initialized outside the loop and once it is initialized with Product level information it never gets re-initialized if Product is non-drop shippable.
We have updated the code to use the storeRequirementMethodEnumId variable for store level information which is defined outside the loop and this will be used to initialize requirementMethodEnumId for each order item and then product level information can override it. That means for each product ProductStore -> Facility -> Product this rule will work properly.

Thanks Pawan Verma for reporting the issue and providing the patch and Jacques Le Roux for review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859910 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 06:13:21 +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 1f78b219e5 "Applied fix from trunk for revision: 1859807"
------------------------------------------------------------------------
r1859807 | jleroux | 2019-05-23 18:41:59 +0200 (jeu. 23 mai 2019) | 5 lignes

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

This should be the last commit, but I can't be sure. So I'll continue to 
monitor the demos logs...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859808 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:43:12 +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 27a375771b "Applied fix from trunk for revision: 1859796"
------------------------------------------------------------------------
r1859796 | jleroux | 2019-05-23 18:33:26 +0200 (jeu. 23 mai 2019) | 5 lignes

Fixed: Mass actions in FindOrders.ftl don't keep parameters
(OFBIZ-11052)

This adds a missing ampersand  after requestParameters.hideFields?default("N") 
when needed 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859797 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:34:30 +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
Jacques Le Roux edb688307f "Applied fix from trunk for revision: 1859708"
------------------------------------------------------------------------
r1859708 | jleroux | 2019-05-22 11:33:46 +0200 (mer. 22 mai 2019) | 8 lignes

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

Getting to navigateContent in content component is better when using view.
You then get into the node you were working on (adding, updating or deleting)

Still WIP for the rest...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859709 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 09:34:33 +00:00
Jacques Le Roux 2d8ee0a04d "Applied fix from trunk for revision: 1859704"
------------------------------------------------------------------------
r1859704 | jleroux | 2019-05-22 10:59:45 +0200 (mer. 22 mai 2019) | 8 lignes

Fixed: When you select a ProductManufacturingRule if several exist only the one 
selected will show multiple times in the list
(OFBIZ-11048)

When you select a ProductManufacturingRule if several exist only the one 
selected will show multiple times in the list

This was due to a wrong usage of auto-fields-service, from pre Apache era
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859705 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 09:00:20 +00:00
Jacques Le Roux 5d4da69296 "Applied fix from trunk for revision: 1859698"
------------------------------------------------------------------------
r1859698 | jleroux | 2019-05-22 10:12:51 +0200 (mer. 22 mai 2019) | 10 lignes

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

Reverts r1859694 request-redirect-noparam is required else the deleted 
ProductManufacturingRule is shown in the edit/update screen with the deleted
ruleId.

I was misleaded because this screen is not standard at all. I guess it's not
much used since it's like that for ages
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859699 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 08:13:36 +00:00
Jacques Le Roux 96fa460f5c "Applied fix from trunk for revision: 1859694"
------------------------------------------------------------------------
r1859694 | jleroux | 2019-05-22 09:44:55 +0200 (mer. 22 mai 2019) | 5 lignes

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

No problems using view here, KISS!
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859696 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 07:48:21 +00:00
Jacques Le Roux 3147ed6a63 "Applied fix from trunk for revision: 1859691"
------------------------------------------------------------------------
r1859691 | jleroux | 2019-05-22 09:39:08 +0200 (mer. 22 mai 2019) | 15 lignes

Fixed: It's impossible to create more than 1 ProductManufacturingRule
(OFBIZ-11047)

In a previous commit for OFBIZ-9997 I wrote:
>DeleteProductManufacturingRule seems weird to me because I don't understand how
>to create several Manufacturing Rules. I'll check Sharan's book :)

I checked Sharan's book and there is nothing about it

It also shows ManufacturingMachineGroupIdAlreadyExist ("Fixed Asset Group ID 
doesn't exist") when you try to create one using manually the 
AddProductManufacturingRule service which makes no sense.

This fixes it by adding the necessary in BomForms.xml and fixing 
addProductManufacturingRule which was wrong from start (pre Apache era)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859692 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 07:39:52 +00:00
Jacques Le Roux 517b300063 "Applied fix from trunk for revision: 1859576"
------------------------------------------------------------------------
r1859576 | jleroux | 2019-05-20 20:02:09 +0200 (lun. 20 mai 2019) | 15 lignes

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

This error happens in many occasions.
It shows only in log and have no effect on UI.
It happens in all supported releases. 
So it's not very bad since it's has no side effects.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

I finally decided to do a whole change, here it is
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859577 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 18:03:03 +00:00
Jacques Le Roux cf377c0dc5 "Applied fix from trunk for revision: 1859571"
------------------------------------------------------------------------
r1859571 | jleroux | 2019-05-20 19:14:43 +0200 (lun. 20 mai 2019) | 22 lignes

Fixed: field emplFromDate is forgot in PayHistory entity
(OFBIZ-11028)

Arpit Mor: steps to regenerate:
    Login to the URL: https://demo-trunk.ofbiz.apache.org/humanres/control/main
    Click on Employments
    Click on New Employments
    Click on Create
Actual: Error message is displayed.

Olivier Heintz: employment is associated with PayHistory, and there is a problem 
in PayHistory entity definition in OFBiz,
In PayHistory, the field fromDate from Employment is confused with fromDate 
about the current record.
A Employment can have multiple PayHistories and should have multiple
because PayHistory should show history of Pay  for a employment  !
It's necessary to have a field emplFromDate (to have the complete employment 
primaryKey).
When modifying a PayRecord the current should be expire and a new one should 
be created.

Thanks: Arpit Mor for report at OFBIZ-10969 and Olivier Heintz for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859572 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 17:16:16 +00:00
Jacques Le Roux 79a02bddb9 "Applied fix from trunk for revision: 1859543"
------------------------------------------------------------------------
r1859543 | jleroux | 2019-05-20 12:10:34 +0200 (lun. 20 mai 2019) | 24 lignes

Fixed: Redirection of pathAlias to aliasTo does not work properly
(OFBIZ-11018)

Link of discussion: https://markmail.org/message/s37whdteejqdzkha

In CMS, we can redirect the user to different path alias using 'aliasTo' field 
of WebSitePathAlias entity.

As per my observation, the content for  "newDemoHome" is rendered properly 
(as expected) but the URL of the page (in browser) doesn't change.
We should also update the URL also, i.e. change browser URL from

Example - 
<WebSitePathAlias aliasTo="demoPage2" fromDate="2016-06-09 13:37:30.43" 
pathAlias="demoHome2" webSiteId="CmsSite"/>
<WebSitePathAlias contentId="CMSS_DEMO_PAGE1" fromDate="2016-06-09 13:37:30.43" 
pathAlias="demoPage2" webSiteId="CmsSite"/>

Based on the above data, if the user hit the 
URL https://localhost:8443/cmssite/cms/demoHome2 
the CMS should internally render the content for 'DemoHome2' at
https://localhost:8443/cmssite/cms/demoPage2

Thanks: Pawan Verma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859544 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 10:11:23 +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
Jacques Le Roux 9d3f383e90 "Applied fix from trunk for revision: 1859268"
------------------------------------------------------------------------
r1859268 | jleroux | 2019-05-15 08:17:03 +0200 (mer. 15 mai 2019) | 15 lignes

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

This error happens in many occasions.
It shows only in log and have no effect on UI.
It happens in all supported releases. 
So it's not very bad since it's has no side effects.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a commit in HR (fix previous one at r1859263)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859269 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 06:17:37 +00:00
Jacques Le Roux 6f8f46b939 "Applied fix from trunk for revision: 1859263"
------------------------------------------------------------------------
r1859263 | jleroux | 2019-05-15 07:58:31 +0200 (mer. 15 mai 2019) | 17 lignes

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

This error happens in many occasions.
It shows only in log and have no effect on UI.
It happens in all supported releases. 
So it's not very bad since it's has no side effects.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a commit in HR

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


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859264 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 05:59:45 +00:00
Aditya Sharma 42ca75f990 Applied fix from trunk for revision: 1859255
===

Fixed: Issue in function getVariantSelectionFeatures of ProductWorker.java
(OFBIZ-11029)
Check should be isVirtual instead of productId. Also handled a NullPointerException for variantProduct.
Thanks Denglong Zhou for reporting the issue, Pawan Verma for the patch and Suraj Khurana & Jacques Le Roux for the review


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859256 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 05:10:52 +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 a1f461a6b3 "Applied fix from trunk for revision: 1859087"
------------------------------------------------------------------------
r1859087 | jleroux | 2019-05-10 19:01:12 +0200 (ven. 10 mai 2019) | 16 lignes

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

At least importContactListParties in marketing component needs 
request-redirect instead of request-redirect-noparam
This reverts it. 

Others still needs to be checked. 
It seems getting to navigateContent in content component is OK, but not totally
sure yet

DeleteProductManufacturingRule seems weird to me because I don't understand how
to create several Manufacturing Rules. I'll check Sharan's book :)

WIP...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859088 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 17:02:10 +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 95cd90ff22 "Applied fix from trunk for revision: 1859033"
------------------------------------------------------------------------
r1859033 | jleroux | 2019-05-09 21:46:07 +0200 (jeu. 09 mai 2019) | 21 lignes

Fixed: Update invoice item looses invoice context
(OFBIZ-11009)

When clicking  the "update" button on an invoice item the context to the 
invoice (invoiceId) is lost. The result is an empty form to add a new invoice 
item without invoice context.

Go to /accounting/control/listInvoiceItems?invoiceId=demo10001
Click on "update" below the existing items. 
You will then be redirect to /accounting/control/listInvoiceItems 
(without invoiceId). You will not see the invoice items as the context to the 
invoice is gone.

jleroux: the same existed for budget items. As Ingo mentioned:
<<It was broken by OFBIZ-9997:
Replace request-redirect w/ no redirect-param attribute 
by request-redirect-noparam>>

Now we need to check all changes done for OFBIZ-9997

Thanks: Ingo Wolfmayr for report and fix proposition
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859034 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 19:47:00 +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
Jacopo Cappellato cfc477c22f Applied fix from trunk for revision: 1858539
===

Improved: Replaced permission-service with required-permissions in order to 
perform permission checks in a way that is more consistent with the screen 
permissions set in the ecommerce blog/forum screens.

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858540 13f79535-47bb-0310-9956-ffa450edef68
2019-05-02 13:42:19 +00:00
Jacques Le Roux 29fe76d1ff "Applied fix from trunk for revision: 1858523"
------------------------------------------------------------------------
r1858523 | lektran | 2019-05-02 10:59:11 +0200 (jeu. 02 mai 2019) | 1 ligne

Fixed: Ensure the story field in ordermgr's EditCustRequest form is html encoded (OFBIZ-11006)

Fixes CVE-2019-10074
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858531 13f79535-47bb-0310-9956-ffa450edef68
2019-05-02 11:53:13 +00:00
Jacques Le Roux 8ed4fd5279 "Applied fix from trunk for revision: 1858444 "
------------------------------------------------------------------------
r1858444 | jleroux | 2019-04-30 18:23:56 +0200 (mar. 30 avr. 2019) | 34 lignes

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

This error happens in many occasions:
Inside another request (eg LookupProduct)
Of after a request (eg login)

It shows only in log and have no effect on UI. Notably the new feature normally 
showing an error message in trunk (OFBIZ-10753) does not shows

It happens in all supported releases. IIRW it always happened, only URLs like 
https://demo-trunk.ofbiz.apache.org/images/defaultImage.jpg work. 
But here it's different because we don't need to call 
https://demo-trunk.ofbiz.apache.org/images by hand to get the issue in log.

So it's not very bad since it's has no side effects, just weird and annoying. 
Because it might hide something undetected yet...

This issue does not appear in R15, a good place to test is for instance 
ordermgr/control/request. 
There cal.gif is called by /images/cal.gif and it works (the images appears) 
but in more recent versions the call is also done to 
/ordermgr/control/images/cal.gif where it fails. 
This 1st appears in ControlFilter in the stack trace.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a 1st commit for the errors I already reported and I'm sure about

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


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858445 13f79535-47bb-0310-9956-ffa450edef68
2019-04-30 16:25:31 +00:00
Jacopo Cappellato e7b4322ed0 Applied fix from trunk for revision: 1858432
===

[Fixed]: Added permission checks to three blog/forum services; improved the 
configuration for the "add article forum" form (the source tab is not needed in 
the ecommerce application).

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858436 13f79535-47bb-0310-9956-ffa450edef68
2019-04-30 14:48:30 +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
Swapnil Mane 8e9ed5c5d9 Applied fix from trunk for revision: 1858319
===

Fixed: createProductFeature service ignoring passed productFeatureId parameter
(OFBIZ-10958)

In the change, used override tag instead of attribute.
And set the optional true in INOUT mode for productFeatureId.
But since we are using entity-auto productFeatureId will be always available (either user provide it and if not passed by the user,  system will autogenerate it), thus it will be always OUT.

Additional Notes:

Here we can't make a changes mentioned below, because, for *optional* field's value, invokeCreate method (internally calling isIn and IsOut methods of ModelParam) of EntityAutoEngine.java consider the attribute (override) defined at last for parameters with the same name.

i.e. for below example,  optional value for productFeatureId for mode IN  will be false (but it is defined true)

{code}
<override name=productFeatureId type=String mode=IN optional=true/>
<override name=productFeatureId type=String mode=OUT optional=false/>
{code}

Due to this, isSinglePkIn (in invokeCreate method) field got false value, and the system will auto-generate the productFeatureId and ignore the user's input.

Similarly, we can't write in this way
{code}
<override name=productFeatureId type=String mode=OUT optional=false/>
<override name=productFeatureId type=String mode=IN optional=true/>
{code}

Because in this case, isSinglePkOut (in invokeCreate method) field got false value, and again the system will auto-generate the productFeatureId and ignore the user's input. 

Thanks:  Ulrich Heidfeld for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858320 13f79535-47bb-0310-9956-ffa450edef68
2019-04-28 11:57:08 +00:00
Jacques Le Roux 148d74ff42 "Applied fix from trunk for revision: 1858275 "
------------------------------------------------------------------------
r1858275 | jleroux | 2019-04-27 15:33:44 +0200 (sam. 27 avr. 2019) | 18 lignes

Fixed: Display of entities in text input field for Product Name
(OFBIZ-10356)

In the url:  catalog/control/EditProductContent?productId=GZ-1006-1
the "Product Name" under "Override Simple Fields" is unnecessarily
expressed in entity format . The string displayed in product name
field is:

"Open Gizmo &#x28;LGPL&#x29;" 

it could have been a
simple "Open Gizmo (LGPL)"

jleroux: this was due to OFBIZ-248 when StringUtil.wrapString() was not yet 
available (IIRW)

Thanks: Rajesh Kumar Mallah for report, Swapnil M Mane for discussion, and
Ankit Joshi for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858276 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 13:34:32 +00:00
Suraj Khurana 622e8c260b Applied fix from trunk for revision: 1858256
===

Fixed: Unable to add survey product to cart in order entry form.
(OFBIZ-10735)
It was due to incorrect usage of param map, used UtilHttp.getCombinedMap instead with some code improvements.
Thanks Amit Gadaley for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858258 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 09:00:20 +00:00
Suraj Khurana 8c1c42eaca Applied fix from trunk for revision: 1858250
===

Fixed: Customer Party getting set as 'organizationPartyId' in one the Account transaction for Customer return invoice.
(OFBIZ-10856)
Thanks Chinmay Patidar for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858251 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 07:17: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
Swapnil Mane 0b8740fb70 Applied fix from trunk for revision: 1857813
===

Fixed: If the picklist cancelation process failed, the picklist item shouldn't be marked as cancel
(OFBIZ-4690)

When a transaction is running in which Picklist entity is updated (i.e. canceled), now if the transaction is rollback the picklist status will not be changed but as per previous code, the picklist item's status will get updated i.e. marked as cancel because we called the cancelPicklistAndItems service in async mode

So the situation here was the Picklist is not canceled, but the Picklist items were marked as cancel.

Thus to fix it, call the cancelPicklistAndItems service in sync mode.

Thanks:  Jacques Le Roux for your thoughts.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857814 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 14:08:07 +00:00