Commit Graph
457 Commits
Author SHA1 Message Date
Jacques Le Roux bbc5757782 Fixed: Upgrade Tomcat from 9.0.54 to 9.0.58 (OFBIZ-12539)
The fix for bug CVE-2020-9484 introduced a time of check, time of use
    vulnerability that allowed a local attacker to perform actions with the
    privileges of the user that the Tomcat process is using. This issue is only
    exploitable when Tomcat is configured to persist sessions using the FileStore.

Also reverts node from 13.14.0 back to 16.13.1. It accidentally slipped in with
OFBIZ-11960
2022-01-26 12:40:29 +01:00
Jacques Le Roux 83d0880ab8 Improved: Use NPM with gradle to get external JS dependencies (OFBIZ-11960)
Updates flot from 0.8.2 to 4.2.2 using npm
2022-01-08 11:18:40 +01:00
Jacques Le Roux a744965567 Fixed: [SECURITY] CVE-2021-44832: Apache Log4j2 (OFBIZ-12475)
See complete explanation at https://issues.apache.org/jira/browse/OFBIZ-12475
2021-12-29 09:05:30 +01:00
Jacques Le Roux 565e4716ac Fixed: [SECURITY] Update TIka because of Apache Log4j2 vulnerability (OFBIZ-12474)
Apache Tika 1.28 contains a migration to log4j2 (2.17.0) from log4j
as well as several other dependency upgrades. Details can be found in
the changes file:
https://www.apache.org/dist/tika/1.28/CHANGES-1.28.txt
2021-12-24 08:13:54 +01:00
Jacques Le Roux f17bcad196 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (removes a space in build.gradle) to test a change in new
Buildbot config
2021-12-22 13:02:45 +01:00
Jacques Le Roux 9c828089a2 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (adds a space in build.gradle) to test a change in new
Buildbot config

Just noticed Buildbot is slow to receive push. So better wait few minutes after
pushing to Buildbot to push from here...
2021-12-22 12:03:51 +01:00
Jacques Le Roux f688c9ff96 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (removes a space in build.gradle) to test a change in new
Buildbot config

Just noticed Buildbot is slow to receive push. So better wait few minutes after
pushing to Buildbot to push from here...
2021-12-22 10:43:53 +01:00
Jacques Le Roux 465296ccee Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (adds a space in build.gradle) to test a change in new
Buildbot config
2021-12-22 08:28:46 +01:00
Jacques Le Roux addc4e0ddd Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (removes a space in build.gradle) to test a change in new
Buildbot config
2021-12-21 06:57:17 +01:00
Jacques Le Roux 991a6ca422 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (adds a space in build.gradle) to test a change in new
Buildbot config
2021-12-20 15:18:59 +01:00
Jacques Le Roux a074a3a7ef Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (removes a space in build.gradle) to test a change in new
Buildbot config: fix wrong source for readme in framework+plugins
2021-12-20 14:24:25 +01:00
Jacques Le Roux 000fd70f66 Improved: Migrate Ofbiz bb 0.8 config to 3.2 (OFBIZ-12456)
No functional change (adds a space in build.gradle) to test a change in new
Buildbot config: fix wrong source for readme in framework+plugins
2021-12-20 13:33:35 +01:00
James Yong 35f7ff34a9 Fixed: Unable to build in M1 Mac (OFBIZ-12460) (#417)
Upgrade Node.js from 12.18.1 to 16.13.1.
16.13.1 is the latest version with long-term support and has build for M1 Mac.
2021-12-19 22:08:59 +08:00
Jacques Le Roux 3e05cf0443 Fixed: [SECURITY] CVE-2021-45105: Apache Log4j2 (OFBIZ-12470)
The configuration seems to have changed.

log4j-slf4j18-impl available in Maven as 2.16.0 is not in 2.17.0.
Also log4j-web is now needed.

I was guided by this block in console.log of trunk demo:
Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/util/SetUtils
	at org.apache.logging.log4j.web.Log4jWebInitializerImpl.getConfigURI(Log4jWebInitializerImpl.java:196)
	at org.apache.logging.log4j.web.Log4jWebInitializerImpl.initializeNonJndi(Log4jWebInitializerImpl.java:175)
	at org.apache.logging.log4j.web.Log4jWebInitializerImpl.start(Log4jWebInitializerImpl.java:112)
	at org.apache.logging.log4j.web.Log4jServletContainerInitializer.onStartup(Log4jServletContainerInitializer.java:57)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5219)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

I'll dbl-check why, notably about log4j-slf4j18-impl.
At least it works well like that.
2021-12-19 08:48:55 +01:00
Jacques Le Roux 78ce0e3fc7 Fixed: [SECURITY] CVE-2021-45105: Apache Log4j2 (OFBIZ-12470)
CVE-2021-45105: Apache Log4j2 versions 2.0-alpha1 through 2.16.0 does not protect
from uncontrolled recursion from self-referential lookups. This allows an
attacker with control over Thread Context Map data to cause a denial of service
when a crafted string is interpreted.
This issue is fixed in Log4j 2.17.0.:
https://logging.apache.org/log4j/2.x/security.html
2021-12-19 03:25:11 +01:00
Jacques Le Roux 479e222bbb Improved: Apache Log4j2 (OFBIZ-12449)
Updates log4j2 from 2.15.0 to 2.16.0 because of
https://lists.apache.org/thread/d6v4r6nosxysyq9rvnr779336yf0woz4

It's not a security issue, I lazily use OFBIZ-12449 because it can improve
security even if it's not necessary (dixit the announce)
2021-12-14 12:22:08 +01:00
Jacques Le Roux 64a0b6e8d0 Fixed: [SECURITY] CVE-2021-44228: Apache Log4j2 (OFBIZ-12449)
CVE-2021-44228: Apache Log4j2 JNDI features do not protect against attacker
controlled LDAP and other JNDI related endpoints:
https://logging.apache.org/log4j/2.x/security.html

I'm not sure we are concerned, have no time to check, better safe than sorry...

I'll restart the demos...
2021-12-11 17:31:41 +01:00
Jacques Le Roux 9e89930e00 Fixed: Fix OFBiz speficic Javascript securiy issues reported by GH CodeQL (OFBIZ-12366)
Previously in commit dfc7ee4 I blindly followed GH CodeQL's advice about js CSS.
I had a doubt, indeed it was irrelevant. I misinterpreted the advice.

Then I tried to follow OWASP's advice about using node-esapi but was unable to
make it work in a reasonable time. Neither with "node require" nor requireJS;
ie using either CommonJS or AMD format, I guess I missed something there.

Anyway, I finally I set my sights on DOMPurify which is doing the job.

There is only one "foot-gun potential":
https://github.com/cure53/DOMPurify#user-content-is-there-any-foot-gun-potential
"If you first sanitize HTML and then modify it afterwards, you might easily void
the effects of sanitization. If you feed the sanitized markup to another library
after sanitization, please be certain that the library doesn't mess around with
the HTML on its own."

Fortunately, that's not a concern in our simple case.

This commit
* fixes the 3 remaining js vulnerabilty reported by
* prevents checking all under node_modules since it's done by npm in console
  (a bit weak though, ie not clearly on purpose)
* gives more information about 'ci' vs 'install' in npmInstallCommand
2021-11-10 16:08:02 +01:00
wpaetzold 3d93c2709e Fixed: Builds fail due to unauthorized access to repo.spring.io/plugins-release (OFBIZ-12351) (#334)
Replaces repository syndication by rometools

Thanks Mart Naum for report
2021-11-09 14:34:44 +01:00
Jacques Le Roux a5a8783893 Improved: Complete checkstyle related work (OFBIZ-12341)
I forgot to put tasks.checkstyleMain.maxErrors at zero.
While at it now show new violations in console
2021-11-02 17:16:19 +01:00
Jacques Le Roux 7edd67a71a Improved: Builds fail due to unauthorized access to repo.spring.io/plugins-release (OFBIZ-12351)
Forgot to save a comment
2021-10-29 17:42:35 +02:00
Jacques Le Roux 8f2583013d Improved: Builds fail due to unauthorized access to repo.spring.io/plugins-release (OFBIZ-12351)
I just flushed my Gradle cache and observed that I am not able to build OFBiz
any longer due to unauthorized access to spring/plugins-release. The repository
seems to be required for com.springsource.com.sun.syndication, maven lists .
I reckon we are affected by the repo.spring.io permission changes.

Thanks: Mart Naum for report, Wiebke for temporary fix (downgrading)
2021-10-29 16:59:48 +02:00
Jacques Le Roux 32d0a51db0 Improved:
(OFBIZ-)

Following
https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/faq.md#how-do-i-use-npm-ci-instead-of-npm-install

I have tried the feature (see in the Jira issue).
I'm not sure it's currently quite useful in OFBiz.
Anyway it does not hurt to add this possibility, notably for specific CI cases

Note that when updating Gradle we may need to review that:
https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/faq.md#is-this-plugin-compatible-with-centralized-repositories-declaration
2021-10-27 18:02:35 +02:00
Jacques Le Roux 49cae3c73a Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Adds getter and setter to ScreenRenderer class
Adds unused hashCode method to ControllerRequestArtifactInfo class
Makes final UomWorker and ContactHelper classes

Only 10 checkstyle issues now
2021-10-17 15:45:55 +02:00
Jacques Le Roux 87f9981f71 Improved: Handle remaining checkstyle errors (OFBIZ-12169)
Fixes wrong methods names in EntityFunction class
2021-10-17 10:49:51 +02:00
Jacques Le Roux 318975161a Improved: Refactor too long methods (OFBIZ-12338)
Forgot change in build.gradle
2021-10-16 14:11:40 +02:00
Jacques Le Roux ace92c0917 Fixed: [SECURITY] CVE-2021-42340 Apache Tomcat DoS (OFBIZ-12337)
Upgrades to Apache Tomcat 9.0.54
2021-10-14 19:27:23 +02:00
Aditya Sharma 4bd30ce4d5 Implemented: Use NPM with gradle to get external JS dependencies (OFBIZ-11960)
Removed javascript for jQuery, jQuery Migrate, jQuery Browser and jQuery Validation from OFBiz sources. Instead these are now retrieved during the build as NPM packages using gradle-node-plugin.

Thanks: Aditya Sharma for implementation.
2021-10-12 20:50:41 +01:00
Jacques Le Roux 3dbcb70f78 Improved: Refactor methods signature to reduce the number of params they use (OFBIZ-12335)
Forgot the change in build.gradle
2021-10-10 12:13:13 +02:00
Jacques Le Roux 8e9c96b118 Improved: less chekstyles issues
One less (from 116 to 115), not sure which one :)
2021-09-30 13:27:56 +02:00
Jacques Le Roux ad1e06b9bd Improved: Update build.gradle to the latest dependencies (OFBIZ-12311)
The tests fails locally but it makes no sense, trying w/ BUilbot...
2021-09-06 10:06:41 +02:00
Eugen Stan 25c75e2839 Implemented: Clojure Service engine (OFBIZ-12302) (#317)
* Added Clojure service and service test and example service
* Added clojure engine
2021-08-10 16:09:39 +02:00
Jacques Le Roux 1f71cfec9e Fixed: Upgrades Tomcat from 9.0.43 to 9.0.48 (due to CVEs-2021-30037/30639/30640) (OFBIZ-12280) 2021-07-12 18:17:17 +02:00
Xin Wang 46722b713f Improved: Upgrade Shiro to 1.7.1 (OFBIZ-12275) (#309)
The default padding scheme of ECB mode for
org.apache.shiro.crypto.AesCipherService is different between v1.4.1 and
v1.7.1, i.e.:

v1.4.1 getPaddingSchemeName() result is "PKCS5Padding"

v1.7.1 getPaddingSchemeName() result is "NoPadding"

This patch specify padding scheme explicitly, after that exception
mentioned in build.gradle does not raise anymore, and initial data can
load successfully.
2021-07-04 19:18:38 +02:00
Eugen Stan 1aaa2e7751 Improved: Remove SVN references in build (OFBIZ-12267) (#305)
Removed SVN references in git ant templates.
2021-07-01 20:23:47 +02:00
Jacques Le Roux 939961cfb1 Fixed: Update PDFBox to 2.0.24 because of CVE-2021-31811 & CVE-2021-31812 (OFBIZ-12256)
CVE-2021-31811: A carefully crafted PDF file can trigger an OutOfMemory-Exception
while loading the file. This issue affects Apache PDFBox version 2.0.23 and prior 2.0.x versions.

CVE-2021-31812: a carefully crafted PDF file can trigger an infinite loop while
loading the file. This issue affects Apache PDFBox version 2.0.23 and prior 2.0.x versions.
2021-06-13 08:54:35 +02:00
Jacques Le Roux 2ebbc51afd Improved: trivial changes in build.gradle and checkstyle.xml 2021-05-17 11:59:37 +02:00
Jacques Le Roux 45f50c910d Improved: Handle remaining checkstyle errors (OFBIZ-12169)
This handles the "'(' should be on the previous line?" rule of MethodParamPad

Actually not completely, because there are still some cases that can't be
handled by changing code, notably when a casting is necessary. I believe there
is an error in checkstyle code. I'll discuss that in dev ML before sending
checkstyle team a report.
2021-05-04 10:34:52 +02:00
Jacques Le Roux 0631278fd5 Fixed: updates Tika because of CVE-2021-2865 2021-03-30 17:09:28 +02:00
Jacques Le Roux df69401118 Fixed: Upgrade Apache PDFBox to 2.0.23 because of CVE-2021-27807 and CVE-2021-27906 (OFBIZ-12205)
Currently we don't declare any dependency on PDFBox. I guess because it's used
as a 3rd party by another lib. Fortunately it's easily done.
2021-03-21 16:27:53 +01:00
Jacques Le Roux c2c609d8e4 Improved: Dependency verification (OFBIZ-12186)
I just read an ASF members thread about this article:
https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610

One member mentioned that the Groovy project is using the Gradle's dependency
verification feature[1] in the Apache Groovy build.

I suggest we do the same, even after the move from JCenter to MavenCentral where
things should be safer.

[1] https://docs.gradle.org/current/userguide/dependency_verification.html

This commit includes:
The  verification-metadata.xml and verification-keyring.gpg used by the
verification task
*.gpg as binary in .gitattrubtes for verification-keyring.gpg

The documentation about the verification in sy-dependency-verification.adoc
with a link and some unrelated changes in security.adoc about security for
OFBiz in production
An empty line removed in build.gradle
2021-02-27 13:53:33 +01:00
Jacques Le Roux 44922f0fba Improved: Update Freemarker to 2.3.31 2021-02-18 13:35:53 +01:00
Michael Brohl dbecce6396 Improved: Corrects max number of checkstyle errors allowed (OFBIZ-12169) 2021-02-15 17:48:09 +01:00
Michael Brohl 69c62f5f00 Merge changes for PR #267 due to conflicting changes in trunk (OFBIZ-12169) 2021-02-15 17:15:18 +01:00
Michael Brohl 8ea75c9e2e Fixed: Adds log4j dependencies to avoid classpath conflict while loading
log4j ReflectionUtil (OFBIZ-12171)
2021-02-13 17:08:53 +01:00
Michael Brohl 2b118ce643 Improved: Switch from jCenter to mavenCentral to handle the jCenter
shutdown (OFBIZ-12171)

See comments in build.gradle for details.
2021-02-13 17:08:53 +01:00
Wiebke Pätzold fab0783722 Improved: Used uppercase 'L' as suggested by checkstyle (OFBIZ-12169) 2021-02-10 12:44:44 +01:00
Wiebke Pätzold 39458d2897 Improved: Removed Conditional logic as shown by checkstyle (OFBIZ-12169) 2021-02-10 11:47:53 +01:00
Wiebke Pätzold 780e00866f Improved: Changed line break so line doesnt't start with ( (OFBIZ-12169) 2021-02-10 11:35:03 +01:00
Wiebke Pätzold 3cd7cf1cea Improved: Changed modifier order (OFBIZ-12169) 2021-02-10 11:31:12 +01:00