Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1367 change log4j-1.2.17 to log4j-2.17.1 #1370

Merged
merged 29 commits into from
Feb 4, 2022

Conversation

jacol84
Copy link
Contributor

@jacol84 jacol84 commented Jan 12, 2022

Pull Request Checklist

Helpful things

Migrating from Log4j 1.x to 2.x

Fixes

Fixes #1367

Purpose

proposal to fix bugs and vulnerabilities in the code
CVE-2021-4104
CVE-2019-17571

Background Context

a good step on update of libraries

TODO: discover if there is another path -Dlog4j2.configurationFile=$path$ or if there is any of: log4j2.xml, log4j2.properties, json, yaml, .... files in resources than log4j will be automatically configured, so Play can simply use this configuration. link

References

log4j2

Copy link
Contributor

@asolntsev asolntsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, the PR is good.
But are you sure log4j2 is better than alternatives? I know many people prefer "Logback" nowadays.

@jacol84
Copy link
Contributor Author

jacol84 commented Jan 12, 2022

may need to give users a choice
use SL4J and add add dependecy.yaml

@xabolcs
Copy link
Contributor

xabolcs commented Jan 12, 2022

But are you sure log4j2 is better than alternatives? I know many people prefer "Logback" nowadays.

+1 for Logback!

Logback Project

Logback is intended as a successor to the popular log4j project, picking up where log4j 1.x leaves off.
Logback's architecture is quite generic so as to apply under different circumstances. At present time, logback is divided into three modules, logback-core, logback-classic and logback-access.

The logback-core module lays the groundwork for the other two modules. The logback-classic module can be assimilated to a significantly improved version of log4j 1.x. Moreover, logback-classic natively implements the SLF4J API so that you can readily switch back and forth between logback and other logging frameworks such as log4j 1.x or java.util.logging (JUL).

The logback-access module integrates with Servlet containers, such as Tomcat and Jetty, to provide HTTP-access log functionality. Note that you could easily build your own module on top of logback-core.

@jacol84
Copy link
Contributor Author

jacol84 commented Jan 14, 2022

add link to Migrating from Log4j 1.x to 2.x

@jacol84
Copy link
Contributor Author

jacol84 commented Jan 14, 2022

I think "PLAY" was using log4j so this is upgrading the library to the latest version - better for sure than staying in the old version
@asolntsev
and the best solution would be to choose which logger you want to use
if you want to use log4j2 or logback your selections should add deps

xael-fry and others added 16 commits January 28, 2022 14:50
…-1354-patch

[playframework#1354] Revert experimental GroovyTempate.compile code to fix template issue
…rk#1372)

* Updated dependencies and allow support for JDK 16 source
* Added comments to tests that are causing problems
* Refresh with latest 3rd dependency versions
* Updated 3rd party library dependencies
* Fixed URLDecoder reference
* Updated module play-guice dependency to 1.11.1 for Guice 5.x support
* Update Byte Buddy and Joda Time dependencies
* WIP: Temporarily commented out failing tests in errors and routing
* Update dependencies
* Updated Eclipse JDT Core to v3.28 that enables JDK 17 source
* Fix compiler mapping foe JDK 17
* 1166: Update documentation
Task-Url: plansocial/PlanSocial#1166
* Update dependencies
* Removed duplicate entry


This reverts commit c151672.
* use more appropriate method for replace single char
* use regex instead of multiple loops through the string to replace chars
* use standard charsets constants instead of its string representations
* inline variable
JAXB RI v2.3.6
XStream v1.4.19
JAXB RI v2.3.6
XStream v1.4.19
@xael-fry xael-fry added this to the 1.7.0 milestone Jan 31, 2022
@xael-fry xael-fry added dependencies Pull requests that update a dependency file improvement labels Jan 31, 2022
 fix CRLF to LF
 update slf4j-api-1.7.35.jar
 add solving the problem when log4j fails to use automatic configuration
@jacol84 jacol84 requested a review from xael-fry February 1, 2022 10:16
@xael-fry
Copy link
Member

xael-fry commented Feb 1, 2022

@jacol84 xan you rebase it to master to avoid conflict? Thanks

 playframework#1367
 fix CRLF to LF
 update slf4j-api-1.7.35.jar
 add solving the problem when log4j fails to use automatic configuration
# Conflicts:
#	framework/dependencies.yml
@jacol84
Copy link
Contributor Author

jacol84 commented Feb 2, 2022

I did a rebase
dw @xael-fry
now has wrninng netty-3.10.6.Final.ja
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.jboss.netty.util.internal.ByteBufferUtil (file:/S:/praca/play/git/play1MY/framework/lib/netty-3.10.6.Final.jar) to method java.nio.DirectByteBuffer.cleaner() WARNING: Please consider reporting this to the maintainers of org.jboss.netty.util.internal.ByteBufferUtil WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release 2022-02-02 09:49:21,946 [play-thread-1] INFO play - Application 'xxx' is now started !

@jacol84
Copy link
Contributor Author

jacol84 commented Feb 2, 2022

@xael-fry
I change "github workflow" to correctly with documentation -- > change folder how run ant
I fixed the test i-am-a-developer (last time I missed it)

@xael-fry xael-fry merged commit d30db81 into playframework:master Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log4j Critical Exploit - Play1 possibly unaffected
9 participants