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

Cleaned-up log4j 1.2 that disables scary networking (base=1.2.17, fully binary compatible) #17

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a5ffe95
[maven-scm] copy for tag v1_2_17
grobmeier May 4, 2012
e10785b
[maven-scm] copy for tag v1_2_17_rc3
grobmeier May 6, 2012
de9f0ea
vote passed
grobmeier May 26, 2012
0f5446b
chore: add .gitignore
lsimons Dec 19, 2021
ffda834
docs: update copyright year
lsimons Dec 19, 2021
de9db67
docs: add a readme
lsimons Dec 19, 2021
e474998
build: check in NTEventLogappender.dll from log4j 1.2.17 binary.
lsimons Dec 19, 2021
a540537
build: rewrite maven build for modern 2021 tools
lsimons Dec 19, 2021
d648d7d
ci: set up github actions
lsimons Dec 19, 2021
07aafec
test: delete several broken low-quality tests
lsimons Dec 19, 2021
12120ee
test: delete old scripts to run tests in favor of mvn test
lsimons Dec 19, 2021
bd88008
test: note why DRFATestCase is slow
lsimons Dec 19, 2021
8cf0234
test: do not run NTEventLogAppenderTest except on Windows
lsimons Dec 19, 2021
e966e75
test: do not run MDCTestCase reflection test on modern JDK
lsimons Dec 19, 2021
05b34e9
test: do not use same output files from many tests
lsimons Dec 19, 2021
cd146da
docs: add missing maven site template resources
lsimons Dec 19, 2021
200e23f
docs: fix download page for 1.2.17
lsimons Dec 19, 2021
45901b8
docs: fix some broken site content
lsimons Dec 19, 2021
4a80521
docs: attempt to update build instructions on website
lsimons Dec 19, 2021
7e81878
fix: pin chainsaw.Main serialVersionUID for japicmp compatibility
lsimons Dec 19, 2021
0e1fb96
fix: remove insecure code from log4j.net package
lsimons Dec 19, 2021
531e972
fix: remove insecure code from log4j.jmx package
lsimons Dec 19, 2021
291837c
fix: remove insecure code from jdbc package
lsimons Dec 19, 2021
02f7edd
fix: remove insecure code from varia package
lsimons Dec 19, 2021
82fb4f0
fix: allow MDC to work on Java >= 9
lsimons Dec 19, 2021
80c7f1f
test: disable a test that is flaky on many platforms
lsimons Dec 19, 2021
a7e7760
test: disable more tests for non-toolchain runs
lsimons Dec 19, 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 }}
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: [email protected]
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: [email protected]
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/
79 changes: 40 additions & 39 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


===========
Using log4j
===========
Expand Down Expand Up @@ -73,32 +57,49 @@ 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.
log4j (as of 1.2.18) is built with Maven 3 and JDK 8 or higher.

To build for compatibility with older JDKs (1.4/5/7), set up a Maven
toolchain JDK with version=1.6 and vendor=oracle. For example set up
the following configuration in ~/.m2/toolchains.xml:

<?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>

See https://maven.apache.org/guides/mini/guide-using-toolchains.html
for more information about maven toolchains.

After setting up a toolchain you can then build using the default
profile:

mvn verify

If you do not care about compatibility with old JDKs, you can use a
build without a toolchain and execute

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:
mvn verify -P no-toolchain

Download JMX 1.2.1 from http://java.sun.com/products/JavaManagement/download.html.
Build results can be found in the target/ subdirectory.

$ 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
==================
NTEventLogAppender
==================

The maven build uses prebuilt NTEventLogAppender.dll and
NTEventLogAppender.amd64.dll binaries. To rebuild these, see

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.
src/ntdll

In case of problems send an e-mail note to
[email protected]. Please do not directly e-mail any
log4j developers. The answer to your question might be useful to other
users. Moreover, there are many knowledgeable users on the log4j-user
mailing lists who can quickly answer your questions.
for more information.
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 here. 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).
71 changes: 0 additions & 71 deletions build.properties.sample

This file was deleted.

Loading