Commit Graph
26146 Commits
Author SHA1 Message Date
Suraj Khurana 2fef06ba38 Fixed: Incorrect data issue for InvoiceItemTypeMap and ReturnItemTypeMap.
(OFBIZ-11971)
As we have returnItemTypeId as RET_MISC_ADJ, same should be used in ReturnItemTypeMap and corresponding InvoiceItemTypeMap.
Thanks Amit Gadaley for reporting and providing the patch.
2020-09-26 18:17:53 +05:30
Jacques Le Roux fcfca0d78d Improved: fixes the executionpolicy for last update of Windows 10
Thanks: Georg Potthast for report on user ML
2020-09-26 09:56:04 +02:00
Jacques Le Roux 41bbf15933 Fixed: Error while decoding url parameters with percent character (OFBIZ-12014)
This has been already fixed (an clearly explained) in OFBIZ-10275 and broken
again in OFBIZ-11822

Thanks: Pradeep Choudhary
2020-09-14 11:18:57 +02:00
Jacques Le Roux 207d8f8ac0 Fixed: display/selection of unit of measure is broken (OFBIZ-11955)
Improve code for UOM dropdown of products like WG-9943

Thanks: Alex
2020-09-11 10:44:55 +02:00
Akash Jain bceba04c6a Fixed: Display/functionality improvement in findParty of OOTB regarding classification group (OFBIZ-10302)
Thanks, Rajesh Kumar Mallah for report.
2020-09-01 16:09:44 +05:30
Jacques Le Roux d670f36713 Fixed: display/selection of unit of measure is broken (OFBIZ-11955)
Fixes UOM dropdown for products like WG-9943

Thanks: Alex
2020-08-31 10:45:15 +02:00
Jacques Le Roux b263ddc2d2 Revert "Improved: Improves service-eca.xsd documentation (OFBIZ-9994)"
This reverts commit 0231626f1c. These changes
should not have been backported
2020-08-31 09:13:33 +02:00
Jacques Le Roux 0231626f1c Improved: Improves service-eca.xsd documentation (OFBIZ-9994)
Fixes some issues

# Conflicts:
#	framework/service/dtd/service-eca.xsd
2020-08-30 18:59:27 +02:00
Jacques Le Roux 3b751db55e Fixed: display/selection of unit of measure is broken
(OFBIZ-11955)

This fixes in in order component

Thanks: Alex
2020-08-30 14:09:32 +02:00
Jacques Le Roux 9366d196af Documented: warns users about demo credentials in production 2020-08-29 10:08:48 +02:00
Akash Jain 4a37b68240 Fixed: Default value flags not working for configurable and variant products at the time of order entry (OFBIZ-10532)
Thanks, Deepak Nigam for report.
2020-08-27 18:15:28 +05:30
Jacques Le Roux 3abd7a2288 Improved: removes a nonsense word left during a C/P 2020-08-27 09:30:38 +02:00
Jacques Le Roux 9b9bc10092 Fixed: MessagingException in sendShipmentScheduledNotification service (OFBIZ-11984)
This MessagingException issue is with sendFrom,
please refer the the code blocks from minilang and groovy versions below:

<!-- find email address for currently logged in user, set as sendFrom -->
<entity-and entity-name="PartyAndContactMech" list="curUserPartyAndContactMechs">
    <field-map field-name="partyId" from-field="userLogin.partyId"/>
    <field-map field-name="contactMechTypeId" value="EMAIL_ADDRESS"/>
</entity-and>

<first-from-list list="curUserPartyAndContactMechs" entry="curUserPartyAndContactMech"/>
<string-append field="sendEmailMap.sendFrom" string="${curUserPartyAndContactMech.infoString}" prefix=","/>

There should not be a prefix, there is always only 1 sender
The sendOrderDeliveryScheduleNotification service was also affected

Thanks: Mridul Pathak for analyse
2020-08-26 19:51:47 +02:00
Jacques Le Roux 1a6f0e7bff Improved: svg files not removed on clean (OFBIZ-11976)
After removing the temporary diles in generateAllPluginsDocumentation
this removes them also in generatePluginDocumentation.

Despite that they still appear after simply running gradlew ofbiz (without any
change), I mean:
ofbiz-framework\plugins\birt\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\ebay\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\ldap\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\myportal\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\projectmgr\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\solr\src\docs\asciidoc\images\OFBiz-Logo.svg

I have no ideas why :/
2020-08-25 15:05:32 +02:00
Jacques Le Roux a61fe713f2 Fixed: svg files not removed on clean (OFBIZ-11976)
Files like birt/src/docs/asciidoc/images/OFBiz-Logo.svg, in many plugins,
don't get removed on clean.

I simply missed to clean them in pluginAsciidoc Gradle task (OFBIZ-10677)

Thanks: Alex Bodnaru for report
2020-08-23 17:42:29 +02:00
Jacques Le Roux dbec7e766c Fixed: Bug in order manager main page when using Arab language (OFBIZ-9687)
It seems that we are getting the issue due to the special character "/" which is
present in OrderManager Uilabel.
I just changed the OrderManager Uilabel value from Buy / Sell Order Manager to
Order Manager and removed the special character "/".

Thanks: Mohammed Rehan Khan
2020-08-22 18:13:01 +02:00
Jacques Le Roux a8821c7a78 Revert "Fixed: Expiring Daemon because JVM heap space is exhausted (OFBIZ-11954)"
This reverts commit 547abb70d6.
2020-08-21 11:36:17 +02:00
Jacques Le Roux 547abb70d6 Fixed: Expiring Daemon because JVM heap space is exhausted (OFBIZ-11954)
Today I got this in log out of the blue:

  Daemon will be stopped at the end of the build after running out of JVM memory
  Expiring Daemon because JVM heap space is exhausted

I checked there was no OutOfMemoryError exception. And apart that in log, the
applications were running well

The most relevant articles I found on the Net were:
https://stackoverflow.com/questions/56075455/expiring-daemon-because-jvm-heap-space-is-exhausted
https://medium.com/@tiwarishani/expiring-daemon-because-jvm-heap-space-is-exhausted-in-react-native-e17c2248c8af

I'm not sure this issue will reproduce (why just now?). I'll discuss this on dev
ML before increasing org.gradle.jvmargs

Thanks: Daniel Watford to confirm on dev ML
2020-08-13 12:13:28 +02:00
Jacques Le Roux 26d150f709 Improved: Add a title to Javadoc overview (OFBIZ-)
We can add a global version heading using the Gradle title Javadoc option:
https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html

Relates to https://markmail.org/message/t3svau3udlwaa7mq
2020-08-12 15:41:25 +02:00
Jacques Le Roux 131592465b Improved: ASL2 header was missing in checkstyle.xml 2020-08-08 16:54:33 +02:00
Jacques Le Roux 69c5f674e7 Fixed: Make all related Cancel/Done buttons return to backHome ie. party profile page (OFBIZ-11943)
Thanks: Priya for the patch
2020-08-06 12:48:15 +02:00
Akash Jain a290fbb348 Fixed: View Image button on order view page fails to render the image (OFBIZ-11734)
Thanks, Arpit Mor for reporting.
2020-08-04 15:58:56 +05:30
Jacques Le Roux 1866a3c464 Fixed: Server-Side Template Injection using Static (OFBIZ-11871)
Thanks to Alvaro's explanations, the problem was in MacroFormRenderer where, for
lookups, we retrieve _LAST_VIEW_NAME_ as a parameter without encoding it.

Thanks: Alvaro for advice

Conflicts handled by hand in UtilHttp.java
2020-08-03 11:02:32 +02:00
Jacques Le Roux 35430d804a Improved: changes content of VERSION file added during INFRA-19443 2020-07-29 11:46:32 +02:00
Jacques Le Roux 070297b3a1 Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834)
Changes made in startsWith and indexOf methods in ContentManagementServices
for OFBIZ-9254  where wrong (reversed). Fortunately only place where this happened.

I added a comment to make clear why we have 2 empty else if

I'll backport later, conflicts to handle by hand...

Thanks: Ankush Upadhyay for spotting the bug

Conflicts handled by hand
2020-07-27 14:30:18 +02:00
Jacques Le Roux e5860cc11b Fixed: Unable to create event in SFA component (OFBIZ-9901)
The tests failed because CAL_OWNER instead of CONTACT was necessary

Conflicts handled by hand in WorkEffortTests.xml
2020-07-25 19:21:08 +02:00
Jacques Le Roux 30c0d6d7af Fixed: One page checkout is broken because of ordermgr::getAssociatedStateList (OFBIZ-11838)
On orderview screen at the ordermgr, when a user tries to change the status of
the order, in OrderInfo.ftl, we are calling "changeOrderStatus" request as

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

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

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

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

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

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

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

Thanks: Pritam Kute!

I picked the 2nd solution
2020-07-25 19:19:32 +02:00
Aditya Sharma b5ae3a5b71 Fixed: Unable to create event in SFA component (OFBIZ-9901)
When creating event for the party other than the loggedin user, the party should be in CAL_OWNER role to be added to event. Added appropriate check in service along with the error message.
Thanks Rubia Elza Joshep for reporting the issue and Aditi Patidar for providing the patch
2020-07-25 18:53:50 +05:30
Jacques Le Roux afda5fa4be Improved: Adds missing jGrowl map file (OFBIZ-11892)
Picked from
https://cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.4.6/jquery.jgrowl.map

Thanks to Alex Bodnaru
2020-07-23 09:13:11 +02:00
Jacques Le Roux 70c4a8aea7 Improved: Reflected XSS in content component (OFBIZ-11840)
Fixes a Reflected XSS vulnerability in content component

Harshit Shukla reported it to the OFBiz security team:
https://demo-stable.ofbiz.apache.org/content/control/stream?contentId="><svg/onload=alert(0)>

It's a post-auth vulnerability so we did not ask for a CVE.

Thanks: Harshit Shukla harshit.shukz@gmail.com
2020-07-18 12:09:20 +02:00
Jacques Le Roux 056088978d Improved: Hard coded label in ProductUomDropDownOnly (OFBIZ-11891)
The select label is not receiving translations.

There are more related issues, but this is independent.

Thanks: Alex Bodnaru
2020-07-16 14:34:53 +02:00
Jacques Le Roux ffd7746acc Improved: adds a link to the HTML and PDF versions on the web site 2020-07-12 11:49:59 +02:00
Aditya Sharma 19c29dacaa Fixed: checkstyle maxErrors value (OFBIZ-11251) 2020-07-11 20:52:09 +05:30
Aditya Sharma 6f1907785d Improved: Used 'checkstyle' linting tool (OFBIZ-11251)
Linting [1] is a software engineering practice which make the code
more readable and maintainable by improving its consistency and
avoiding potential programming mistakes.

Gradle provides a core plugin for the ‘checkstyle’ tool [2][3] which
provides such facility. The lint actions are triggered when running
‘gradle check’.

There are a lot reported errors that will need to be fixed
incrementally in the future. We ensure that new errors will not be
introduced by defining a global threshold of “allowed” errors
corresponding to the sum of errors currently found in the framework
and in the official plugins.

[1] https://en.wikipedia.org/wiki/Lint_(software)
[2] https://checkstyle.org/
[3] https://docs.gradle.org/current/userguide/checkstyle_plugin.html

Thanks Mathieu Lirzin for the contribution and Taher Alkhateeb & Jacques Le Roux for their feedback
2020-07-11 20:49:50 +05:30
Jacques Le Roux 546de4eb1a Fixed: MODULE is not module :/ (backporting is never easy!) 2020-07-11 11:18:52 +02:00
Jacques Le Roux ecc4e84a95 Fixed: don't remove localhost from host-headers-allowed this was only for testing 2020-07-11 09:57:04 +02:00
Jacques Le Roux fd3667b6f7 Improved: Put the AsciiDoc files in main repo under the web site (OFBIZ-11879)
We have AsciiDoc files in main repo and it would be better to have them also in
HTML format under the web site: https://ci.apache.org/projects/ofbiz/site

For that a new generateReadmeFiles is needed and new "readme" locations under
each of https://ci.apache.org/projects/ofbiz/site "sub-dirs".
We can create those from Buildbot like we did with INFRA-20311
2020-07-11 09:47:37 +02:00
Jacques Le Roux c70fa51ae7 Improved: better message for host-headers-allowed
Adds an explanation about what to do when using own domain.

Some users don't look into the log so it's better to set also the exception
message in order for them to have it right at 1st glance.

Conflicts handled in webapp/control/RequestHandler.java
2020-07-11 09:47:23 +02:00
Jacques Le Roux c5ba62e3e0 Improved: Adds information to install without the demo data 2020-07-08 10:33:56 +02:00
Michael Brohl b791dca9e7 Fixed: Added missing AJP connector property introduced for Tomcat 9.0.31
(OFBIZ-11848)
2020-07-03 17:35:17 +02:00
Suraj Khurana b31ed9c4ad Fixed: Console warnings related to OrderHeader caching.
(OFBIZ-11858)
Thanks Praveen Sharma for the patch and Jacques for review.
2020-07-02 10:58:28 +05:30
Jacques Le Roux 466e426f8b Improved: BigDecimal casting in Groovy (OFBIZ-11862)
It's not a bug here, but casting is not necessary, better keep things simple
2020-06-30 15:06:51 +02:00
Michael Brohl f1bf6a5a13 Fixed: Upgrades Tomcat to 9.0.36 due to CVE-2020-11996 (OFBIZ-11848) 2020-06-28 12:46:58 +02:00
Pawan Verma 11dedfa79f Fixed: EntityQuery queryCount is throwing error with distinct method (OFBIZ-11294)
Added missing support for selectFields in queryCount and all the subsequent methods.

Thanks: Deepak Dixit for the review.
2020-06-28 01:41:57 +05:30
Jacques Le Roux 8358c299e0 Fixed: With Rainbow theme, a scrollbar appears at bottom where it's not needed
(OFBIZ-10174)

With Rainbow theme, even in large screens, a scrollbar appears at bottom where
it's useless.

The CSS which is adding a border-right on the application bar is adding extra
1px width causing this issue. Attached the patch to remove extra width for the
same.

Thanks: Nameet Jain for the patch
2020-06-27 16:16:01 +02:00
Jacques Le Roux 47b16d4044 Fixed: IDOR vulnerability in the order processing feature in ecommerce component (OFBIZ-11836)
Fixes a bug when there are no problem viewing the order, my bad
2020-06-27 10:46:33 +02:00
Jacques Le Roux 34c02e3bde Fixed: IDOR vulnerability in the order processing feature in ecommerce component (OFBIZ-11836)
https://demo-stable.ofbiz.apache.org/ecommerce/control/order.pdf?orderId=WSCO10000

In the above URL, the parameter 'orderId' has the value 'WSCO10000' and after
incrementing the value to 'WSCO10001' or 'WSCO10002' will download the receipt
of other orders which have been placed by other users.

All the available order receipts can be downloaded by running an automated tool
(Burp Intruder) on the parameter 'orderId=WSCOXXXXX'

I have successfully tested this by using 2 different accounts: DemoCustomer and
DemoCustomer2

An attacker can download order receipts of other users and this could lead to
information disclosure.

The only real solution to this issue is to implement access control. The user
needs to be authorized for the requested information before the server provides
it.

Thanks: Harshit Shukla [mailto:harshit.shukz@gmail.com]reported this IDOR
vulnerability to the OFBiz security team, and we thank him for that.
2020-06-26 09:29:25 +02:00
Jacques Le Roux b376a2f4b9 Fixed: getEntityRefData service has a weird issue (OFBIZ-11401)
MODULE does not exist in R18 (I did by hand in R17 so did not miss it...)
2020-06-18 18:26:39 +02:00
Jacques Le Roux 1e5ffa6e4c Fixed: getEntityRefData service has a weird issue (OFBIZ-11401)
It's reproductible on trunk demo though only visible in log, UI shows no issue

R17 and R18 are also affected, R16 is OK.

Ankush: This stacktrace should be coming for all entities where
default-resource-name is defined on entity definition but no property exist in
defined resource for key EntityDescription.entityname and FieldDescription.field.

As we want to have these entity labels as much as possible, we can simply print
warning about the missing entity descriptions and field descriptions for
readability purpose instead of printing huge exceptions stacktrace.

Thanks: Ankush Upadhyay and Pierre Smits for the help

Conflicts handled by hand (swallowing exceptions is lazy and bad :p)
2020-06-18 17:45:57 +02:00
Jacques Le Roux d2a976a592 Fixed: Double encoded urls are not being decoded (OFBIZ-11822)
This was broken by OFBIZ-10275

Thanks: Alex Bodnaru
2020-06-15 13:31:04 +02:00