Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Cleaned-up log4j 1.2 that disables scary networking (trunk, binary-incompatible) #16

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ef5a79d
Start cleaning up ancient log4j 1.x to make a security release.
lsimons Dec 15, 2021
7d8ff68
Note why DRFATestCase seems slow
lsimons Dec 15, 2021
851b299
Updating pom, cleaning up build, upgrading plugins.
lsimons Dec 15, 2021
e3e086f
Fix site generation after plugin upgrade.
lsimons Dec 15, 2021
f33fa15
Check in NTEventLogappender.dll from log4j 1.2.17 binary.
lsimons Dec 16, 2021
74d7f6f
Update NOTICE copyright year.
lsimons Dec 16, 2021
2563d92
Note where changelog is kept in README.md.
lsimons Dec 16, 2021
490255f
Fix broken javadoc syntax in MDC.java
lsimons Dec 16, 2021
cfa9012
Further modernize and clean up maven build.
lsimons Dec 16, 2021
cdb674e
Fix old MDC java version parsing bug.
lsimons Dec 16, 2021
c11c645
Disable potentially unsafe networking code in log4j.net.
lsimons Dec 16, 2021
2283a0e
Disable more potentialy unsafe networking code in log4j.net.
lsimons Dec 17, 2021
e89a55b
Clean up test suite
lsimons Dec 17, 2021
b6485ac
Create maven.yml
geertjanw Aug 24, 2020
e8f2419
Build wrangling to make things work on GitHub.
lsimons Dec 17, 2021
46500bd
Fix "Apache License, Version 2.0" spelling
don-vip May 13, 2019
bcfbbf8
Copyright year should be from inception until now.
lsimons Dec 18, 2021
72d3fb0
Use github.com everywhere for consistency.
lsimons Dec 18, 2021
911fc23
Remove JMSSink, SimpleSocketServer and SocketServer.
lsimons Dec 18, 2021
246b043
Delete deprecated jmx Agent.
lsimons Dec 18, 2021
5a20db6
Make SMTPAppender warn about insecure usage.
lsimons Dec 18, 2021
a243ea2
Disable more unsafe networking code in log4j.jdbc.
lsimons Dec 18, 2021
0a60021
Add @deprecated warnings for remaining net code.
lsimons Dec 18, 2021
8479b06
Disable more unsafe networking code in log4j.varia.
lsimons Dec 18, 2021
1d42226
Improve javadoc warning around deprecated classes.
lsimons Dec 18, 2021
3430ea7
Remove roadmap page from website.
lsimons Dec 18, 2021
653c649
Make a guess as to update release instructions.
lsimons Dec 18, 2021
9b719c1
Document new security and bug fix situation on website
lsimons Dec 18, 2021
bc6ac7e
Align README.md warnings with website content
lsimons Dec 18, 2021
47e5146
Add a github actions build using JDK 7 as the toolchain
lsimons Dec 18, 2021
5c29c40
Set up japicmp for API source and binary compatibility checks
lsimons Dec 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Maven CI Build

on: [push]

jobs:
JDK6Toolchain:
name: Toolchain 1.6, JDK 11, OS ${{ matrix.os }}
lsimons marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, windows-2019, windows-2022]
fail-fast: true
max-parallel: 2
steps:
- uses: actions/checkout@v1
- name: Install Toolchain JDK
uses: battila7/jdk-via-jabba@v1
with:
jdk: zulu@1.6.119
lsimons marked this conversation as resolved.
Show resolved Hide resolved
javaHomeEnvironmentVariable: TOOLCHAIN_JDK
addBinDirectoryToPath: false
- name: Configure Maven for Toolchain
shell: bash
run: |
mkdir -p $HOME/.m2 && cat >$HOME/.m2/toolchains.xml <<EOF
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.6</version>
<vendor>oracle</vendor><!-- definitely a lie -->
</provides>
<configuration>
<jdkHome>${{ env.TOOLCHAIN_JDK }}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF
- name: Set up Modern JDK for Maven
uses: actions/setup-java@v1
with:
java-version: 11
- name: Run maven build
run: mvn clean verify site assembly:single -B
JDK7Toolchain:
name: Toolchain 1.7, JDK 11, OS ubuntu-18.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Install Toolchain JDK
uses: battila7/jdk-via-jabba@v1
with:
jdk: zulu@1.7.292
javaHomeEnvironmentVariable: TOOLCHAIN_JDK
addBinDirectoryToPath: false
- name: Configure Maven for Toolchain
shell: bash
run: |
mkdir -p $HOME/.m2 && cat >$HOME/.m2/toolchains.xml <<EOF
<?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.6</version><!-- a little lie -->
<vendor>oracle</vendor><!-- definitely a lie -->
</provides>
<configuration>
<jdkHome>${{ env.TOOLCHAIN_JDK }}</jdkHome>
</configuration>
</toolchain>
</toolchains>
EOF
- name: Set up Modern JDK for Maven
uses: actions/setup-java@v1
with:
java-version: 11
- name: Run maven build
run: mvn clean verify -B
Modern:
name: JDK ${{ matrix.jdk }}, OS ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, windows-2019, windows-2022]
jdk: [8, 11, 17]
fail-fast: true
max-parallel: 4
steps:
- uses: actions/checkout@v1
- name: Set up Modern JDK for Maven
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Run maven build
run: mvn clean verify -B -P no-toolchain
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target/
tests/output/
tests/temp
.idea/
52 changes: 29 additions & 23 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -73,29 +73,35 @@ except test cases and classes from the "examples" and
Building log4j
==============

log4j (as of 1.2.15) is built with Maven 2. To rebuild log4j,
place Maven 2 on the PATH and execute "mvn package". The resulting
jar will be placed in the target subdirectory.

If building with JDK 1.4, one dependency will need to be manually
installed since its license does not allow it to be placed in the
online maven repositories. If not already installed, a build attempt will
describe where to download and how to install the dependency. To
install the dependency:

Download JMX 1.2.1 from http://java.sun.com/products/JavaManagement/download.html.

$ jar xf jmx-1_2_1-ri.zip
$ mvn install:install-file -DgroupId=com.sun.jmx -DartifactId=jmxri \
-Dversion=1.2.1 -Dpackaging=jar -Dfile=jmx-1_2_1-bin/lib/jmxri.jar


The build script will attempt to build NTEventLogAppender.dll if
MinGW is available on the path. If the unit tests are run on Windows
without NTEventLogAppender.dll, many warnings of the missing DLL
will be generated. An installer for MinGW on Windows is
available for download at http://sourceforge.net/project/showfiles.php?group_id=2435.
MinGW is also available through the package managers of many Linux distributions.
log4j (as of 1.2.18) is built with Maven 3 and JDK 6.

To configure your Maven installation to build with JDK 6, provide a
~/.m2/toolchains.xml file defining an oracle jdk 1.6, for example:

<?xml version="1.0" encoding="UTF-8"?>
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<version>1.6</version>
<vendor>oracle</vendor>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/java-1.6.0-openjdk-amd64</jdkHome>
<!-- <jdkHome>C:\Program Files\Java\jdk1.6.0_45</jdkHome> -->
</configuration>
</toolchain>
</toolchains>

Either Oracle JDK 6 or OpenJDK 6 is supported, but our pom expects vendor "oracle".

To rebuild log4j, place Maven 3 on the PATH and execute "mvn package".
The resulting jar will be placed in the target subdirectory.

The main maven build will no longer automatically attempt to build
NTEventLogAppender.dll or NTEventLogAppender.amd64.dll. To rebuild these
files see src/ntdll/build.xml, and check in new versions into
src/main/resources.

In case of problems send an e-mail note to
log4j-user@logging.apache.org. Please do not directly e-mail any
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache log4j
Copyright 2010 The Apache Software Foundation
Copyright 2000-2021 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
Binary file added NTEventLogAppender.dll
Binary file not shown.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# End Of Life

On August 5, 2015 the Logging Services Project Management Committee announced that Log4j 1.x had reached end of life. For complete text of the announcement please see the [Apache Blog](https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces). Users of Log4j 1 are recommended to upgrade to [Apache Log4j 2](https://logging.apache.org/log4j/2.x/index.html).

# Security release 1.2.18

Several security vulnerabilities have been identified in Log4J 1 up to and including 1.2.17. All users should upgrade to Log4J 2. For users that cannot upgrade, certain fixes are made available in a new security fix release 1.2.18. Please note Log4J 1 remains End Of Life.

See [the log4j 1.2 website](https://logging.apache.org/log4j/1.2/) for more information.

## Changes in 1.2.18

See the [Changes Report](https://logging.apache.org/log4j/1.2/changes-report.html) for a detailed list of changes. This file is generated from [changes.xml](src/changes/changes.xml).
Loading