Commit Graph
26125 Commits
Author SHA1 Message Date
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
Aditya Sharma 962e2495d4 Fixed: console error TypeError: document is undefined
(OFBIZ-11752)

As the document object was not passed to the IFFE call for the FORMALIZE function, it gives console error for the missing document object when accessed
2020-06-11 20:07:51 +05:30
Aditya Sharma 6ff83fb452 Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-11752)

Upgraded jQuery to 3.5.2 and jQuery migrate to 3.3.0 to vulnerabilities of medium severity
Regex in its jQuery.htmlPrefilter sometimes may introduce XSS; https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
2020-06-11 20:07:33 +05:30
Jacques Le Roux b9780b2031 Improved: Removes plugins as a submodule (OFBIZ-8459)
This was wrongly put in with several commits done for OFBIZ-8459 where plugins
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=b39c179
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=3a4d22
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=bda6192
2020-06-09 16:10:34 +02:00
Jacques Le Roux 324edc9e8a Fixed: plugins in common-theme/webapp/common/js is not monitored by git (OFBIZ-11745)
In .gitignore in root ofbiz directory there is plugins/

so all directory plugins are ignored

if the line is replace by /plugins/ only root directory plugins is ignored

Can't cherry-pick so trying by hand (easy stuff)

Thanks: Olivier
2020-06-09 14:49:16 +02:00
Jacques Le Roux a4227abee0 Improved: no functional change
Adds missing ASL2 licenses

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860259 13f79535-47bb-0310-9956-ffa450edef68
2020-06-09 11:48:38 +02:00
Suraj Khurana 0d285ccaeb Fixed: Unnecessary iterations and setting inventory for all productFacilities in setLastInventoryCount.
(OFBIZ-11796)

Instead of updating all product facilities records on one inventory item change, we should be changing only specific product facility record for that the inventory item belongs to. Thanks Jacques, Pierre, Pawan and Arun for the review.
2020-06-08 18:01:45 +05:30
holivier 4568c6f55a Improvement: Help link using asciidoc files via generated html
(OFBIZ-11693)

Change release to 18.12 for all asciidoc files where there is still
17.12
2020-06-05 14:37:03 +02:00
Pawan Verma 1d3c7915c9 Fixed: startup-service does not work without runtime-data-id(OFBIZ-11668) 2020-06-02 17:25:51 +05:30
Pawan Verma a4f0563b31 Fixed: Overview of shipments shows links to edit shipment it should point to viewshipment(OFBIZ-11787)
Thanks: Pierre for your contribution.
2020-06-02 17:15:56 +05:30
Pawan Verma 1b76a5a5d4 Fixed: UI issue in payment lookup(OFBIZ-9476)
Thanks: Pallavi for report and patch and pierre from the review.
2020-06-02 16:37:49 +05:30
Pawan Verma 523a84f0bd Fixed: ViewShipment in facility does not show phone details(OFBIZ-11785)
Thanks, Pierre for the report.
2020-06-02 15:34:58 +05:30
Jacques Le Roux 9e2c7a10a4 Improved: adds pull_request_template.md (OFBIZ-11722)
Forgot to commit the replacement
2020-05-31 08:48:33 +02:00
Aditya Sharma 955319862e Fixed: RequestHandlerException due missing controller entries
(OFBIZ-9478)
Fixed missing Lookup controller entries for the following pages:
1. LookupBudget for Employment Applications page of party
2. LookupDataResource for Content page of facility
3. LookupFixedAsset for Inventory Items Details page of facility

Thank you Pallavi Goyal for reporting the issue and Humera Khan for providing the patch
2020-05-31 09:56:32 +05:30
Pawan Verma 73bfbc643b Fixed: Corrected package path for UtilDateTime.(OFBIZ-6408) 2020-05-30 23:08:33 +05:30
Pawan Verma b35dd06905 Fixed: Adding a group order generates an error(OFBIZ-6408)
The error is caused by an invalid expression, the two boolean evaluations should reside in the same groovy scriptlet.

Thanks, Pierre for report, Scott for the solution and Adrian, Jacques, Rahul for the review.
2020-05-30 15:37:30 +05:30
holivier 88f87f27f0 fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)
In a form, when <sort-order tag is used, the children analyze not works
because, getTagName() is used not the getLocalName(). getTagName()
return "wf:sort-field" when getLocalName return "sort-field".
So change getTagName() to getLocalName() for sort-order children
2020-05-29 11:48:25 +02:00
holivier 6e845ccfc4 Fixed: drop-down field not work when in a compound-widget file (OFBIZ-11676)
When, in ModelFormField, FieldInfoWithOptions (which read xml file ) is
call, test on tag name is done with getName() and not getLocalName() so
none "option" is recognize when field is declare on a compound-widget
file. getName() is change to getLocalName()
2020-05-29 11:35:48 +02:00
Pawan Verma 807555a657 Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)
Thanks, Jacques for the report.
2020-05-28 19:59:33 +05:30
Pawan Verma e8df7d5329 Revert "Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)"
This reverts commit f610b288b0.
2020-05-28 19:53:37 +05:30
Pawan Verma f610b288b0 Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)
Thanks, Jacques for the report.
2020-05-28 19:45:51 +05:30
Pawan Verma 025cc09588 Fixed: InventoryItemStatus is not updated to INV_PROMISED status while creating sales order for serialized product(OFBIZ-8459)
Thanks, Vaibhav for the report and patch and Pranay for the review.
2020-05-28 17:26:05 +05:30