Commit Graph
27737 Commits
Author SHA1 Message Date
Jacques Le Roux 3926134950 Improved: Moves Shipment Services files from sub-dirs to shipment dir (OFBIZ-11468)
In PR#150 Pierre Smits suggested to move this new Groovy files updir:

"There is no need to have subfolders defining where the services belong to when
such is already captured in the name of the file, e.g.:
folder /shipment/receipt/ when the filename has ShipmentReceiptServices.groovy
Similarly
/shipment/issuance/ when the filename has ShipmentIssuanceServices.groovy"
2020-06-27 08:01:08 +02:00
Pawan Verma 9cf6ec8c90 Improved: Refactor PickListServices#isBinComplete method to remove unnecessary iterations(OFBIZ-11823)
Thanks: Suraj and Jacques for the review.
2020-06-27 11:27:51 +05:30
Pawan Verma f0af2894e5 Improved: Merge identical catch blocks in single catch block(OFBIZ-11827)
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.
2020-06-27 11:23:12 +05:30
Jacques Le Roux 4f841e9897 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:28:49 +02:00
Jacques Le Roux 2c85c8e43b Fixed: Updated hard coded values of location types and used all available location enums instead (OFBIZ-6042)
Fixes a typo
2020-06-25 11:00:31 +02:00
Jacques Le Roux 260373673d Fixed: Adds missing license headers
Also renames gradle.yml into gradle.yaml
2020-06-25 09:18:40 +02:00
wpaetzoldandWiebke Pätzold 7335ce021a OFBIZ-11468 Improved: Convert ShipmentReceiptServices.xml mini lang to groovy (#150)
* Improved: Convert ShipmentReceiptServices.xml mini lang to groovy

(OFBIZ-11468)

Also converted getTotalIssuedQuantityForOrderItem in IssuanceServices, because it is used in ShipmentReceiptServices and needed more return values.

* split to long lines

Co-authored-by: Wiebke Pätzold <Wiebke.Paetzold@ecomify.de>
2020-06-24 10:57:28 +02:00
Pawan Verma 4275825b4a Improved: Replace anonymous types with lambda expressions(OFBIZ-11833) 2020-06-24 14:11:05 +05:30
Pawan Verma bb18170d71 Improved: Converted test-group to test-case as there is only one test case.(OFBIZ-11560) 2020-06-24 12:30:30 +05:30
Jacques Le Roux 3c22a3f912 Improved: Convert testTaxGeoId test from XML to Groovy (OFBIZ-11560)
This can be tested using

./gradlew "ofbiz --test component=accounting --test suitename=paymentappltests"

Thanks: Rohit Hukkeri for report and Anushi Gupta for the patch
2020-06-23 15:14:02 +02:00
Pawan Verma 9b1e13093f Improved: Set checkstyleMain.maxErrors to 26678 (-4) 2020-06-22 21:37:40 +05:30
Pawan Verma 2a4a617d0d Improved: Replace try-finally with try with resources(OFBIZ-11826)
Set checkstyleMain.maxErrors to 26678 (-4)

Thanks: Jacques for the review.
2020-06-22 21:32:42 +05:30
Pawan Verma 30732dd57b Improved: Replace Map.get() with Map.getOrDefault() method.(OFBIZ-11832)
Set checkstyleMain.maxErrors to 26682 (-2)
2020-06-22 21:26:18 +05:30
Pawan Verma 15c005fa42 Improved: Replace for-loop with forEach loop(OFBIZ-11829)
Also modified some checkstyle issues.

Set checkstyleMain.maxErrors to 26684 (-61)

Thanks: Jacques for the review.
2020-06-22 21:17:49 +05:30
Pawan Verma 18f5dadd93 Improved: Replace single method call lambda with method reference(OFBIZ-11835)
Thanks: Jacques for the review.
2020-06-22 20:59:44 +05:30
holivier 3a601c90fb Documented: remove docbook help files for manufacturing (OFBIZ-11587)
All files have been migrated to asciidoc format.
2020-06-20 16:04:12 +02:00
holivier 915073ba84 Documented: migrate help link to asciidoc user manual for manufacturing
(OFBIZ-11416)

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
manufacturing and add a short page with a link to the new help
2020-06-20 16:03:58 +02:00
holivier 74a1b73fda Documented: Manufacturing MRP migration to asciidoc
(OFBIZ-11416)

For all of files, content has been directly put in mfg-mrp.adoc
2020-06-20 16:02:46 +02:00
holivier 47a7b30bac Documented: Manufacturing Bill Of Material migration to asciidoc
(OFBIZ-11416)

For all of files, content has been directly put in mfg-bom.adoc
2020-06-20 16:02:46 +02:00
holivier 166d0b33fd Documented: Manufacturing Cost Component Calc migration to asciidoc
(OFBIZ-11416)

The HELP file content has been directly put in manufacturing.adoc
2020-06-20 16:02:46 +02:00
holivier a69ca79ab4 Documented: Manufacturing Calendar migration to asciidoc
(OFBIZ-11416)

For all of files content has been directly put in
mfg-calendar.adoc
2020-06-20 16:02:46 +02:00
holivier b13573a330 Documented: Manufacturing Routing Task migration to asciidoc
(OFBIZ-11416)

For all of files content has been directly put in
mfg-routing-task.adoc
2020-06-20 16:02:46 +02:00
holivier 061cb0dabd Documented: Manufacturing Routing migration to asciidoc
(OFBIZ-11416)

For all of files content has been directly put in
mfg-routing.adoc
2020-06-20 16:02:46 +02:00
holivier 7d1c2c5ed4 Documented: Manufacturing Production Run migration to asciidoc
(OFBIZ-11416)

For most of files content has been directly put in
mfg-production-run.adoc
2020-06-20 16:02:46 +02:00
holivier 8652c3ca04 Documented: Manufacturing migration to asciidoc and new documentation
organization
(OFBIZ-11416)

Main files
2020-06-20 16:02:46 +02:00
James Yong ea537323fa Reverted: Use Compound Widget on rest of the project (OFBIZ-11821) 2020-06-20 20:16:11 +08:00
James Yong 49601e1213 Reverted: Use Compound Widget on rest of the project (OFBIZ-11821)
Removed FindRequestCompound.xml
2020-06-20 20:12:35 +08:00
James Yong 2f557b7fba Reverted: Use Compound Widget on rest of the project (OFBIZ-11821)
Verbose and may better suit in custom implementation.
2020-06-20 20:06:42 +08:00
holivier 21077ac056 Documented: remove docbook help files for humanres (OFBIZ-11587)
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
humanres and add a short page with a link to the new help
2020-06-19 17:23:29 +02:00
holivier a65c000a07 Documented: remove docbook help files for content
(OFBIZ-11587)

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
content and add a short page with a link to the new help
2020-06-19 17:23:02 +02:00
James Yong 4dbdf720c5 Fixed: Apply multi-block attr to each application (OFBIZ-11706)
Rendering screen within freemarker template not done correctly when multi-block=true

Thanks: Jacques for reporting
2020-06-19 23:09:17 +08:00
Gil Portenseigne 7c8aab3d9d Improved: Migrate checkCreateOrderRequirement service to groovy
(OFBIZ-9984)

This commit migrate also dependent method and remove createRequirementFromItemATP service
2020-06-19 16:59:00 +02:00
Jacques Le Roux 743c790a36 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
2020-06-18 17:39:49 +02:00
James Yong 3a13afe811 Fixed: showHelp not working (OFBIZ-11803)
Cater for page that uses layoutSettings.VT_STYLESHEET
instead of layoutSettings.styleSheets
2020-06-18 23:29:02 +08:00
Jacques Le Roux e545ef3dc9 Improved: Use a .asf.yaml file for more information in OFBiz GitHub repos (OFBIZ-11825)
The description was too long, I have started a thread in dev ML about that. For
now I propose that.
2020-06-18 14:17:14 +02:00
Pawan Verma 43747764bc Improved: Change resources with proper naming convention in framework(OFBIZ-11834)
Also, modified checkstyleMain.maxErrors to 26735(-24)

Thanks: Jacques and Suraj for review.
2020-06-18 15:30:00 +05:30
Jacques Le Roux 1a492e666d Improved: Use a .asf.yaml file for more information in OFBiz GitHub repos (OFBIZ-11825)
Labels "must be lowercase alphanumerical and <= 35 characters!"

The description also is too long, I'll start a thread in dev ML
2020-06-18 10:58:08 +02:00
Jacques Le Roux ac40219197 Improved: Use a .asf.yaml file for more information in OFBiz GitHub repos (OFBIZ-11825)
2 folds in this commit
Adds Plugins after
https://github.com/apache/infrastructure-puppet/compare/298c7bead6db...00161079a800
where asfgit.cfg.default_branch has been added and should equals to trunk for us

1. Tests it works
2. If OK adds to plugins repos in another commit later
2020-06-18 10:07:46 +02:00
Jacques Le Roux 15d4878bbb Improved: Use a .asf.yaml file for more information in OFBiz GitHub repos (OFBIZ-11825)
Improves labels
2020-06-17 19:15:50 +02:00
Jacques Le Roux f7cf0aef8f Improved: Checkstyle in GH (OFBIZ-11304)
We need to include plugins
2020-06-17 18:51:58 +02:00
James Yong da3473b183 Improved: Use Compound Widget on rest of the project (OFBIZ-11821)
Remove unnecessary namespace
2020-06-17 22:42:01 +08:00
Jacques Le Roux ccc769bce7 Improved: Checkstyle in GH (OFBIZ-11304)
This workflow will check the java style with Gradle
Adapted from: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

This is a test...
2020-06-17 15:01:20 +02:00
holivier da690493f9 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/

change in HelpScreen.xml
2020-06-17 14:34:51 +02:00
Jacques Le Roux c791102f88 Improved: Use a .asf.yaml file for more information in OFBiz GitHub repos (OFBIZ-11825)
Improves labels
2020-06-17 12:11:00 +02:00
Jacques Le Roux 781917ab30 Improved: Use a .asf.yaml file for more information in OFBiz GitHub repos (OFBIZ-11825)
Descriptions and labels are self serve - by placing a .asf.yaml file in your
default branch with some settings: https://s.apache.org/78e1o

Thanks: Gavin McDonald from Infra
2020-06-17 12:07:14 +02:00
Jacques Le Roux 50fa929b83 Improved: Clean code according to SpotBugs and Eclipse (OFBIZ-11824)
Handles 2 possible NPR reported by SpotBugs
Removes the unused createPrimaryKeyFetcher method as reported by Eclipse
Reformats modified code to stay into 150 chars by line and other style issues
Sets tasks.checkstyleMain.maxErrors to 26759 (-1)
2020-06-17 10:07:00 +02:00
Jacques Le Roux 488b9b6b9a Improved: Checks if the value passed to checkStringForHtmlSafe is not null (OFBIZ-11822)
This was reported by SpotBugs in Eclipse to prevent a possible NPE.

It seems to me that it's more complex than that because of the
PolicyFactory::sanitize methods signatures where @Nullable annotation is
used. So the SpotBugs warning remains, anyway can't hurt.

BTW found 92 issues reported by SpotBugs in Eclipse, among them 33 are "scary"

I had to add 1 to tasks.checkstyleMain.maxErrors because of
https://github.com/apache/ofbiz-framework/pull/203 that I pulled after the push
was rejected by the pre-push local Git hook
2020-06-16 14:05:16 +02:00
Priya SharmaandPriya Sharma a3059c097d [Implemented] Introduce the option for specifying Check (Reference) Number upon using Check as payment method during ordering (#203)
Done the following:
- Added a field on the UI to allow the input of the check reference number
- Added logic to set this reference number on the cartpaymentinfo map
- Added logic to fetch the reference number from the order preference record and apply it on the payment.

(OFBIZ-7377)

Co-authored-by: Priya Sharma <priya.sharma@hotwaxsystems.com>
2020-06-16 14:55:35 +05:30
Jacques Le Roux df828419be Fixed: Double encoded urls are not being decoded (OFBIZ-11822)
This was broken by OFBIZ-10275

Thanks: Alex Bodnaru
2020-06-15 13:25:35 +02:00
Pawan Verma 1b637fae5c Improved: Converted testBillingAppl test from XML to Groovy(OFBIZ-11558)
Thanks: Rohit for your contribution.
2020-06-14 14:26:42 +05:30