Commit Graph
27737 Commits
Author SHA1 Message Date
Suraj Khurana 286303c65f Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-framework into trunk 2020-04-25 17:53:15 +05:30
Suraj Khurana 757551a8fd Improved: All the service level error messages for missing required field for catalog component.
(OFBIZ-7739)
Thanks Ratnesh Upadhyay for reporting, reviewing the updated patch and Sega for initial patch.
2020-04-25 17:52:53 +05:30
Pawan Verma a74480ec5a Improved: Convert AutoAcctgFinAccountTests from XML to Groovy. (#68)
(OFBIZ-11507)(OFBIZ-11508)(OFBIZ-11509)(OFBIZ-11510)(OFBIZ-11511)(OFBIZ-11512)(OFBIZ-11513)(OFBIZ-11514)(OFBIZ-11515)(OFBIZ-11516)

Thanks: Rohit Hukkeri for the report
2020-04-25 12:25:22 +05:30
Pawan Verma ae9f726875 Improved: Convert AutoAcctgCostTests from XML to Groovy (#57)
(OFBIZ-11505)

Thanks: Rohit for the report.
2020-04-25 12:17:08 +05:30
Jacques Le Roux 72186eaa80 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

Comments about "recommended" org.asciidoctor.jvm.convert
2020-04-21 18:43:11 +02:00
Jacques Le Roux df52f733b3 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

Checkstyle is a game where you can't never win.
And the result (formatting) is sometimes ugly, it's a pain!
2020-04-21 17:31:27 +02:00
Jacques Le Roux ef097c7a9a Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

Replaces deprecated calls
2020-04-21 15:49:00 +02:00
Jacques Le Roux fc546722b8 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

Reverts to shiro-core:1.4.1, got this issue in loadAll:

Exception in thread "main" org.apache.shiro.crypto.CryptoException:
Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@44a98a23].
[...]
at org.apache.ofbiz.entity.datasource.GenericDAO.insert(GenericDAO.java:110)
[...]
Caused by:
javax.crypto.IllegalBlockSizeException: Input length not multiple of 16 bytes
at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1109)
at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1053)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
at javax.crypto.Cipher.doFinal(Cipher.java:2164)
at org.apache.shiro.crypto.JcaCipherService.crypt(JcaCipherService.java:459)
2020-04-21 12:36:38 +02:00
Jacques Le Roux bef48434bb Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

I tried to update to Groovy 3 but got a compile issue with commons-cli.
I did not dig further.
2020-04-21 12:00:25 +02:00
Jacques Le Roux a721ba7557 Documented: fixes wrong indentations 2020-04-20 18:57:58 +02:00
Jacques Le Roux d0144d96e1 Improved: Increase the size of http.upload.max.sizethreshold
(OFBIZ-11598)

That's rather refactoring to avoid to have the size hardcoded in several places
Next: ask if it's OK for everyone to increase the size
2020-04-19 15:41:10 +02:00
Jacques Le Roux 7ecff33c2a Improved: Updates dependencycheck to last version 2020-04-19 11:39:51 +02:00
Jacques Le Roux 200c0e85fc Implemented: Convert createContentAlternativeUrl service from mini-lang to Groovy
(OFBIZ-11389)

Thanks:  Priya Sharma for patch and  Pawan Verma for review
2020-04-19 09:48:24 +02:00
Pawan Verma e2901786c2 Fixed: Exception Error reflecting while Ecommerce Quick Checkout and Ordermgr Checkout
(OFBIZ-11506)

Here is more detail:
getRelatedParties service(groovy) was returning duplicate key of relatedPartyIdList. So HashMap was passed instead of List of string in entity condition that's why we are getting type casting error.

Thanks: Archana Asthana for report and Mohammed Rehan Khan for the patch.
2020-04-18 13:23:58 +05:30
Jacques Le Roux 57805aebab Fixed: Error removing an uploaded party content
(OFBIZ-11597)

When you try to remove an uploaded party content you get this error:

ControlServlet                |E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException:
Unknown request [removePartyContent/viewprofile];
this request does not exist or cannot be called directly.

While at it I also fixed the similar case for payment methods
2020-04-17 17:19:08 +02:00
Jacques Le Roux c52786cee1 Improved: right number of errors for check style (things changes quickly) 2020-04-16 19:27:44 +02:00
Jacques Le Roux 6d3d8f73c2 Fixed: Error in uploading very large files, ie >2MB
(OFBIZ-11534)

This was not supposed to be committed, actually (wrong) part of OFBIZ-11597
2020-04-16 16:02:20 +02:00
Jacques Le Roux 4725ae68d8 Fixed: Error in uploading very large files, ie >2MB
(OFBIZ-11534)

There is an issue in uploading large files, I am able to upload files up to 2 GB
successfully but getting an error when trying to upload a file larger than 2GB.

Example -
1. Go to party profile -
https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin
2. Try to create a party content with a file larger than 2 GB
3. Error on console

jleroux:
For a 2GB+ file you need to set Xmx to more than the double of the file size,
eg: gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx5048M"

You then get another small issue (only in log) when redirecting to send the
partyId parameter.

This is because, DiskFileItem is a temporary Object with a null value contained
in "fileItems" attribute. It can't be detected by UtilMisc::makeMapSerializable
and that makes "fileItems" not serializable. So it must be removed from
reqAttrMap.

Thanks: Chandan Khandelwal for report, Michael for suggesting a very large file
to upload
2020-04-16 15:46:09 +02:00
Jacques Le Roux b025990488 Improved: updates tasks.checkstyleMain.maxErrors 2020-04-16 15:21:55 +02:00
Jacques Le Roux afb35572d0 Improved: Removes (no longer?) right TODO 2020-04-16 15:18:08 +02:00
Jacques Le Roux 07a472f89c Documented: improves security.properties documentation 2020-04-15 19:31:51 +02:00
Jacques Le Roux fdb995fd50 Documented: adds CSRF defense and updates password and JWT 2020-04-15 19:30:53 +02:00
Jacques Le Roux d8025d41dc Improved: Add security.internal.sso.enabled and security.token.key
SystemProperties

(OFBIZ-11594)(OFBIZ-11470)

After adding more latitude to set same site by using
EntityUtilProperties::getPropertyValueFromDelegatorName for retrieving the value
possibly from the DB as a SystemProperty, adds the value as strict in
SSOJWTDemoData.xml
2020-04-15 15:15:13 +02:00
Jacques Le Roux 98f6d7ea8d Improved: Internal SSO: adds more time to compensate for possible time difference 2020-04-15 15:08:43 +02:00
Jacques Le Roux e0c8a1f4b0 Fixed: 'FindJob' generates an error
(OFBIZ-11590)

This is due to OFBIZ-11402. Handling a converter for java.time.ZoneRegion is
complicated. Adding a toString() is enough.

Also 2 automated formatting while at it...
2020-04-14 13:42:11 +02:00
Jacques Le Roux 01e98b5b5f Improved: Add security.internal.sso.enabled and security.token.key
SystemProperties

(OFBIZ-11594)

Adds more latitude to set same site by using
EntityUtilProperties::getPropertyValueFromDelegatorName for retrieving the value
possibly from the DB as a SystemProperty.

OF course this would not work with tenants, but I doubt the "internal" SSO
feature will ever be use in a tenants context
2020-04-13 17:25:25 +02:00
Jacques Le Roux ff9335ac8c Improved: Add security.internal.sso.enabled and security.token.key
SystemProperties

(OFBIZ-11594)

This comes handy when testing, from examples component, the internal SSO feature
which allows a token based login between OFBiz instances

The SSOJWTDemoData.xml inadvertently slipped in w/ previous commit
2020-04-13 12:14:48 +02:00
Jacques Le Roux e1988a29c8 Improved: moves "10 seconds" comments from security.properties to CommonEvents.java
Also removes trailing blanks in security.properties
2020-04-13 11:40:58 +02:00
Jacques Le Roux 03780e4665 Fixed: "entity/list" request is not handled well
(OFBIZ-11593)

Fixes the resolveURIBasicOverrideView test
2020-04-13 11:38:04 +02:00
Jacques Le Roux ed410dfd68 Fixed: "entity/list" request is not handled well
(OFBIZ-11593)

The FilterEntities widget form is also an issue because it's a POST form and
"entity/list" request use the GET method. Using "entitymaint" as target works
(POST by default)
2020-04-12 13:59:25 +02:00
Jacques Le Roux e487122624 Fixed: "entity/list" request is not handled well
(OFBIZ-11593)

The "entity/list" request has been put in with OFBIZ-11007. It's used to call
the entitymaint view and so is a demo/didactic duplicate of entitymaint request.
It's only used in FindGeneric screen (look for WebtoolsBackToEntityList label).
It's problematic because since the CSRF token defense was put in you can no
longer filter the entities from the entities list screen, even when the default
NoCsrfDefenseStrategy is used. It works if you use the entitymaint request
instead.

Anyway, 2020-01-19 I proposed in OFBIZ-11306 a solution for such cases.
It was not used because 2020-02-14 I thought it was no longer needed,
but it's necessary for this case, and maybe others not already detected.

Here it's implementation (only trunk)
2020-04-12 13:17:37 +02:00
Jacques Le Roux aef9382a9c Implemented: Convert createPayment service from mini-lang to groovy DSL
(OFBIZ-11479)

Better code with Groovy truth

Thanks: Pawan Verma
2020-04-09 14:27:16 +02:00
Jacques Le Roux b8848355d1 Implemented: Convert createPayment service from mini-lang to groovy DSL
(OFBIZ-11479)

jleroux: I have only changed the MODULE name (and uppercased it)

Thanks: Priya Sharma
2020-04-09 11:13:09 +02:00
Nicolas Malin f6418d52f5 Improved: Convert OrderReturnService.xml from mini lang to groovy
(OFBIZ-11442)

Thanks to Sebastian Berg for providing the patch
2020-04-08 14:25:00 +02:00
Jacques Le Roux 2d47e253e1 Improved: Adds the download-the-gradle-wrapper section 2020-04-07 15:34:38 +02:00
Jacques Le Roux 7958d6d55d Fixed: Updates checkstyleMain.maxErrors to fits with Buildbot report
Never ever install Eclipse Checkstyle plugin. It does not use the same version
than Gradle, it's then a mess (Eclipse's is newer).

Fixes issues in CsrfUtilTests.java
2020-04-06 19:23:14 +02:00
Jacques Le Roux b21327153a Fixed: Updates checkstyleMain.maxErrors to fits with Buildbot report
Checkstyle is broken on my side (locally) because I installed the Eclipse
Checkstyle plugin
2020-04-06 14:25:38 +02:00
Jacques Le Roux 5c534a9f98 Fixed: POC for CSRF Token
(OFBIZ-11306)

Fixes missing default NoCsrfDefenseStrategy in Header.ftl files
2020-04-06 12:12:39 +02:00
Jacques Le Roux b95fa36bf4 Improved: follow checkstyle conventions in files committed for CSRF token defense
Mostly manually-automated, so some changes are not perfect. I have manually
changed back excessive ones

Comments out ArrayTypeStyle checkstyle
Updates checkstyleMain.maxErrors
2020-04-06 12:05:16 +02:00
Jacques Le Roux ddb8f4273a Improved: replaces module by MODULE everywhere 2020-04-05 19:46:34 +02:00
Jacques Le Roux ab9b048d07 Improved: fixes a Javadoc issue 2020-04-05 12:29:47 +02:00
Jacques Le Roux ba707d45be Implemented: POC for CSRF Token
(OFBIZ-11306)

Simple strategy is to rely on SameSite 'strict' value in SameSiteFilter in all
supported branches. No backport needed with the changes here.

Thanks: James for all the good work we did together :)
2020-04-05 11:29:40 +02:00
Jacques Le Roux 05354b73b7 Improved: prevent [rawtypes] found raw type: List at RequestHandler.java:89 2020-04-04 19:40:26 +02:00
Jacques Le Roux e0f0d5271a Fixed: Prevent Host Header Injection (CVE-2019-12425)
(OFBIZ-11583)
2020-04-04 19:32:02 +02:00
Jacques Le Roux ba548f626e Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk
Because of GitHub message on PR56:
This branch cannot be rebased due to conflicts
2020-04-04 17:58:07 +02:00
Jacques Le Roux 645d419574 Merge branch 'trunk' into POC-for-CSRF-Token-OFBIZ-11306 2020-04-04 17:52:06 +02:00
Jacques Le Roux 768353a093 Improved:
Implemented:
Documented:
Completed:
Reverted:
Fixed:

(OFBIZ-)
Explanation
Thanks:
2020-04-04 15:49:49 +02:00
Jacques Le Roux 5bc579ab4a Merges OFBiz trunk 2020-04-04 15:49:49 +02:00
Nicolas Malin 37f33f48ff Fixed: correct path to ftpAddress services
(OFBIZ-11359)

After the minilang ContactMarchServices.xml to groovy, I forgot to change
the path of existant ftpAddress services already present before.

Thanks to Olivier Heintz for this alert
2020-04-04 15:49:44 +02:00
Nicolas Malin 8fc5028be9 Fixed: correct path to ftpAddress services
(OFBIZ-11359)

After the minilang ContactMarchServices.xml to groovy, I forgot to change
the path of existant ftpAddress services already present before.

Thanks to Olivier Heintz for this alert
2020-04-04 15:49:43 +02:00