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
(OFBIZ-11947)
This is done for applications component. Also corrected some variables as per naming convention best practices.
Thanks Jacques for review.
This is how I intended to do it. But, since I have a save action to format
edited lines, Eclipse forced an "unwrapping". I had to check in "Line Wrapping":
"Never join already wrapped lines", pfew!
There are some inconsistencies in the code for string comparison statusId.equals(PRUN_COMPLETED) whereas it should be written as PRUN_COMPLETED.equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks: Devanshu for your contribution.
The order created with test case testCreateOrderServiceProduct did not get
approved so the quick ship process did not work correctly while with specific
configurableServiceOrder-test new order has got approved and the quick ship
process worked correctly.
We got multiple payment methods i.e. EXT_PAYPAL and EXT_COD but in the test case
only EXT_COD was defined.
Without shopping cart tests testIntegration works perfectly.
Shopping cart has multiple payment methods, and as cart has multiple payment
methods, order is not approved
(org/apache/ofbiz/order/shoppingcart/CheckOutHelper.java:1166)
This ensures single paymentMethod. It could reviewed again when converting
ShoppingCartTests.xml to Groovy. I have added a comment about that
Thanks: Pawan and Suraj
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.
'{' is not followed by whitespace.
'}' is not followed by whitespace.
'}' is not preceded with whitespace.
'typecast' is not followed by whitespace.
'try' is not followed by whitespace.
';' is preceded with whitespace.
(OFBIZ-11580)
All files have been migrated to asciidoc format and help link now point
to the html file generated from the asciidoc files
In the global Help Docbook index tree, remove all points about
Order and add a short page with a link to the new help
Remove docbook help files for Order
(OFBIZ-11580)
For all of HELP_Order files content has been directly put in
order.adoc except for order_report which has its own file
user-manual is updated to include it in.
Sometimes use wrong type castings for BigDecimal:
I have observed that for typecasting in groovy, we have used the wrong coding
pattern like
(BigDecimal) 0
It should be like
0 as BigDecimal
Note that this does not apply to decimal because in case of decimal, the default
type is always BigDecimal in Groovy.
Thanks: Pritam Kute for spotting the issue in OFBIZ-11843
From Java8 we have Collection.removeIf() method works by applying the condition provided in the Predicate instance to all the elements in the Collection on which it is invoked. The elements which satisfy the condition are retained while the remaining are removed from the Collection.
In Java SE 7 and later, a single catch block can handle more than one type of exception. This feature can reduce code duplication and lessen the temptation to catch an overly broad exception.
Thanks: Jacques for the review.
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.