Skip to content

Commit 254b82b

Browse files
committed
Merge branch '2.3.0.0' into main for new release.
2 parents 2e8694c + 7797bc3 commit 254b82b

File tree

52 files changed

+1085
-577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1085
-577
lines changed

.github/workflows/superlinter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
# Runs the Super-Linter action and ignore errors
2121
- name: Run Super-Linter
22-
uses: github/super-linter@v3
22+
uses: github/super-linter@v4
2323
env:
2424
DEFAULT_BRANCH: develop
2525
DISABLE_ERRORS: true

.snyk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2+
version: v1.14.0
3+
ignore:
4+
SNYK-JAVA-COMMONSIO-1277109:
5+
- commons-io:commons-io:
6+
reason: ESAPI cannot upgrade past the current commons-io version and still maintain Java 7 compatibility
7+
expires: '2025-12-30T00:00:00.000Z'

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Enterprise Security API for Java (Legacy)
44
[![Build Status](https://travis-ci.org/bkimminich/esapi-java-legacy.svg?branch=master)](https://travis-ci.org/bkimminich/esapi-java-legacy)
55
[![Coverage Status](https://coveralls.io/repos/github/bkimminich/esapi-java-legacy/badge.svg?branch=develop)](https://coveralls.io/github/bkimminich/esapi-java-legacy?branch=develop)
66
[![Coverity Status](https://scan.coverity.com/projects/8517/badge.svg)](https://scan.coverity.com/projects/bkimminich-esapi-java-legacy)
7-
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/137/badge)](https://bestpractices.coreinfrastructure.org/projects/137)
7+
[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/137/badge)](https://bestpractices.coreinfrastructure.org/projects/137)
88

99
<table border=0>
1010
<tr>
@@ -14,6 +14,11 @@ OWASP® ESAPI (The OWASP Enterprise Security API) is a free, open source, web ap
1414
</tr>
1515
</table>
1616

17+
# A word about ESAPI and Log4J vulnerabilities
18+
This is way too detailed to litter the README file with, but several of you have
19+
been asking about this, so I wrote up something on it and posted it to the ESAPI
20+
Users Google group. You can find it at [A word about Log4J vulnerabilities in ESAPI - the TL;DR version](https://groups.google.com/a/owasp.org/g/esapi-project-users/c/_CR8d-dpvMU).
21+
1722
# Where is the OWASP ESAPI wiki page?
1823
You can find the OWASP ESAPI wiki pages at [https://owasp.org/www-project-enterprise-security-api/](https://owasp.org/www-project-enterprise-security-api/). The ESAPI legacy GitHub repo also has a few useful wiki pages.
1924

@@ -34,10 +39,10 @@ Note however that work on ESAPI 3 has not yet become in earnest and is only in i
3439
# ESAPI release notes
3540
The ESAPI release notes may be found in ESAPI's "documentation" directory. They are generally named "esapi4java-core-*2.#.#.#*-release-notes.txt", where "*2.#.#.#*" refers to the ESAPI release number (which uses semantic versioning).
3641
## IMPORTANT
37-
Starting with ESAPI 2.2.3.0, ESAPI is using a version of AntiSamy that by default includes 'slf4j-simple' and does XML schema validation on the AntiSamy policy files. Please **READ** the release notes for the 2.2.3.0 release (at least the beginning portion) for some important notes that likely will affect your use of ESAPI! You have been warned!!!
42+
Starting with ESAPI 2.2.3.0, ESAPI is using a version of AntiSamy that by default includes 'slf4j-simple' and does XML schema validation on the AntiSamy policy files. Please **READ** the [release notes for the 2.2.3.0 release](https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/esapi4java-core-2.2.3.0-release-notes.txt) (at least the beginning portion) for some important notes that likely will affect your use of ESAPI! You have been warned!!!
3843

3944
# Locating ESAPI Jar files
40-
The [latest ESAPI release](https://github.com/ESAPI/esapi-java-legacy/releases/latest) is 2.2.3.0. The default configuration jar and its GPG signature can be found at [esapi-2.2.3.0-configuration.jar](https://github.com/ESAPI/esapi-java-legacy/releases/download/esapi-2.2.3.0/esapi-2.2.3.0-configuration.jar) and [esapi-2.2.3.0-configuration.jar.asc](https://github.com/ESAPI/esapi-java-legacy/releases/download/esapi-2.2.3.0/esapi-2.2.3.0-configuration.jar.asc) respectively.
45+
The [latest ESAPI release](https://github.com/ESAPI/esapi-java-legacy/releases/latest) is 2.2.3.1. The default configuration jar and its GPG signature can be found at [esapi-2.2.3.1-configuration.jar](https://github.com/ESAPI/esapi-java-legacy/releases/download/esapi-2.2.3.1/esapi-2.2.3.1-configuration.jar) and [esapi-2.2.3.1-configuration.jar.asc](https://github.com/ESAPI/esapi-java-legacy/releases/download/esapi-2.2.3.1/esapi-2.2.3.1-configuration.jar.asc) respectively.
4146

4247
The latest *regular* ESAPI jars can are available from Maven Central.
4348

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7-
| 2.2.0.0 | :white_check_mark: |
8-
| 2.1.0.1 | :x:, upgrade to 2.2.0.0|
7+
| 2.2.3.1 (latest) | :white_check_mark: |
8+
| 2.1.0.1-2.2.3.0 | :x:, upgrade to latest release |
99
| <= 1.4.x | :x:, no longer supported AT ALL |
1010

1111
## Reporting a Vulnerability

configuration/esapi/ESAPI.properties

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ Encryptor.cipher_modes.combined_modes=GCM,CCM,IAPM,EAX,OCB,CWC
194194
# Additional cipher modes allowed for ESAPI 2.0 encryption. These
195195
# cipher modes are in _addition_ to those specified by the property
196196
# 'Encryptor.cipher_modes.combined_modes'.
197-
# Note: We will add support for streaming modes like CFB & OFB once
198-
# we add support for 'specified' to the property 'Encryptor.ChooseIVMethod'
199-
# (probably in ESAPI 2.1).
200197
# DISCUSS: Better name?
201198
Encryptor.cipher_modes.additional_allowed=CBC
202199

@@ -223,37 +220,27 @@ Encryptor.EncryptionKeyLength=128
223220
Encryptor.MinEncryptionKeyLength=128
224221

225222
# Because 2.x uses CBC mode by default, it requires an initialization vector (IV).
226-
# (All cipher modes except ECB require an IV.) There are two choices: we can either
227-
# use a fixed IV known to both parties or allow ESAPI to choose a random IV. While
228-
# the IV does not need to be hidden from adversaries, it is important that the
229-
# adversary not be allowed to choose it. Also, random IVs are generally much more
230-
# secure than fixed IVs. (In fact, it is essential that feed-back cipher modes
231-
# such as CFB and OFB use a different IV for each encryption with a given key so
232-
# in such cases, random IVs are much preferred. By default, ESAPI 2.0 uses random
233-
# IVs. If you wish to use 'fixed' IVs, set 'Encryptor.ChooseIVMethod=fixed' and
234-
# uncomment the Encryptor.fixedIV.
235-
#
236-
# Valid values: random|fixed|specified 'specified' not yet implemented; planned for 2.3
237-
# 'fixed' is deprecated as of 2.2
238-
# and will be removed in 2.3.
223+
# (All cipher modes except ECB require an IV.) Previously there were two choices: we can either
224+
# use a fixed IV known to both parties or allow ESAPI to choose a random IV. The
225+
# former was deprecated in ESAPI 2.2 and removed in ESAPI 2.3. It was not secure
226+
# because the Encryptor (as are all the other major ESAPI components) is a
227+
# singleton and thus the same IV would get reused each time. It was not a
228+
# well-thought out plan. (To do it correctly means we need to add a setIV() method
229+
# and get rid of the Encryptor singleton, thus it will not happen until 3.0.)
230+
# However, while the IV does not need to be hidden from adversaries, it is important that the
231+
# adversary not be allowed to choose it. Thus for now, ESAPI just chooses a random IV.
232+
# Originally there was plans to allow a developer to provide a class and method
233+
# name to define a custom static method to generate an IV, but that is just
234+
# trouble waiting to happen. Thus in effect, the ONLY acceptable property value
235+
# for this property is "random". In the not too distant future (possibly the
236+
# next release), I will be removing it, but for now I am leaving this and
237+
# checking for it so a ConfigurationException can be thrown if anyone using
238+
# ESAPI ignored the deprecation warning message and still has it set to "fixed".
239+
#
240+
# Valid values: random
239241
Encryptor.ChooseIVMethod=random
240242

241243

242-
# If you choose to use a fixed IV, then you must place a fixed IV here that
243-
# is known to all others who are sharing your secret key. The format should
244-
# be a hex string that is the same length as the cipher block size for the
245-
# cipher algorithm that you are using. The following is an *example* for AES
246-
# from an AES test vector for AES-128/CBC as described in:
247-
# NIST Special Publication 800-38A (2001 Edition)
248-
# "Recommendation for Block Cipher Modes of Operation".
249-
# (Note that the block size for AES is 16 bytes == 128 bits.)
250-
#
251-
# @Deprecated -- fixed IVs are deprecated as of the 2.2 release and support
252-
# will be removed in the next release (tentatively, 2.3).
253-
# If you MUST use this, at least replace this IV with one
254-
# that your legacy application was using.
255-
Encryptor.fixedIV=0x000102030405060708090a0b0c0d0e0f
256-
257244
# Whether or not CipherText should use a message authentication code (MAC) with it.
258245
# This prevents an adversary from altering the IV as well as allowing a more
259246
# fool-proof way of determining the decryption failed because of an incorrect
@@ -469,7 +456,7 @@ Validator.Redirect=^\\/test.*$
469456
Validator.HTTPScheme=^(http|https)$
470457
Validator.HTTPServerName=^[a-zA-Z0-9_.\\-]*$
471458
Validator.HTTPCookieName=^[a-zA-Z0-9\\-_]{1,32}$
472-
Validator.HTTPCookieValue=^[a-zA-Z0-9\\-\\/+=_ ]*$
459+
Validator.HTTPCookieValue=^[a-zA-Z0-9\\-\\/+=_ ]{0,1024}$
473460
# Note that headerName and Value length is also configured in the HTTPUtilities section
474461
Validator.HTTPHeaderName=^[a-zA-Z0-9\\-_]{1,256}$
475462
Validator.HTTPHeaderValue=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$

configuration/esapi/antisamy-esapi.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ Slashdot allowed tags taken from "Reply" page:
3131
space characters.
3232
-->
3333

34-
<regexp name="htmlTitle" value="[a-zA-Z0-9\s-_',:\[\]!\./\\\(\)]*"/> <!-- force non-empty with a '+' at the end instead of '*' -->
35-
<regexp name="onsiteURL" value="([\w\\/\.\?=&amp;;\#-~]+|\#(\w)+)"/>
36-
<regexp name="offsiteURL" value="(\s)*((ht|f)tp(s?)://|mailto:)[A-Za-z0-9]+[~a-zA-Z0-9-_\.@#$%&amp;;:,\?=/\+!]*(\s)*"/>
34+
<regexp name="htmlTitle" value="[\p{L}\p{N}\s\-_',:\[\]!\./\\\(\)&amp;]*"/>
35+
<regexp name="onsiteURL" value="^(?!//)(?![\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*(&amp;colon))[\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*"/>
36+
<regexp name="offsiteURL" value="(\s)*((ht|f)tp(s?)://|mailto:)[\p{L}\p{N}]+[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;;:\-_~,\?=/!\(\)]*(\s)*"/>
3737

3838
</common-regexps>
3939

1.72 KB
Binary file not shown.
4.31 KB
Binary file not shown.
30 KB
Binary file not shown.
123 KB
Binary file not shown.

0 commit comments

Comments
 (0)