Hi Everyone,
I'm working on my minimal ESAPI test. I have ESAPI.properties
(downloaded from GitHub [1] using wget) in pwd. When I run the test
program, I see the message:
ESAPI: Not found in 'org.owasp.esapi.resources' directory or
file not readable: /home/jwalton/Desktop/ESAPI-Test/ESAPI.properties
I'm not sure why the file is not readable:
$ pwd
/home/jwalton/Desktop/ESAPI-Test
$ ls -Al ESAPI.properties
-rw-rw-r-- 1 jwalton jwalton 28600 Jul 9 17:01 ESAPI.properties
$ head -n 4 ESAPI.properties
#
# OWASP Enterprise Security API (ESAPI) Properties file --
PRODUCTION Version
#
# This file is part of the Open Web Application Security Project (OWASP)
Any ideas what might be wrong?
Thanks in advance.
-----
[1]
https://raw.githubusercontent.com/ESAPI/esapi-java-legacy/develop/configuration/esapi/ESAPI.properties
-----
$ javac -cp esapi-2.5.2.0.jar ESAPITest.java && java -cp
"$(pwd):esapi-2.5.2.0.jar:esapi-2.5.2.0-configuration.jar" ESAPITest
"Hello World"
ESAPI: WARNING: System property [org.owasp.esapi.opsteam] is not set
ESAPI: WARNING: System property [org.owasp.esapi.devteam] is not set
ESAPI: Attempting to load ESAPI.properties via file I/O.
ESAPI: Attempting to load ESAPI.properties as resource file via file I/O.
ESAPI: Not found in 'org.owasp.esapi.resources' directory or file not
readable: /home/jwalton/Desktop/ESAPI-Test/ESAPI.properties
ESAPI: Not found in SystemResource Directory/resourceDirectory:
.esapi/ESAPI.properties
ESAPI: Not found in 'user.home' (/home/jwalton) directory:
/home/jwalton/esapi/ESAPI.properties
ESAPI: Loading ESAPI.properties via file I/O failed. Exception was:
java.io.FileNotFoundException
ESAPI: Attempting to load ESAPI.properties via the classpath.
ESAPI: SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from '/
(root)' using current thread context class loader!
ESAPI: SecurityConfiguration for
Validator.ConfigurationFile.MultiValued not found in ESAPI.properties.
Using default: false
ESAPI: Attempting to load validation.properties via file I/O.
ESAPI: Attempting to load validation.properties as resource file via file I/O.
ESAPI: Not found in 'org.owasp.esapi.resources' directory or file not
readable: /home/jwalton/Desktop/ESAPI-Test/validation.properties
ESAPI: Not found in SystemResource Directory/resourceDirectory:
.esapi/validation.properties
ESAPI: Not found in 'user.home' (/home/jwalton) directory:
/home/jwalton/esapi/validation.properties
ESAPI: Loading validation.properties via file I/O failed.
ESAPI: Attempting to load validation.properties via the classpath.
ESAPI: validation.properties could not be loaded by any means. fail..
Caught java.lang.IllegalArgumentException; exception message was:
java.lang.IllegalArgumentException: Failed to load ESAPI.properties as
a classloader resource.
ESAPI: DefaultSecurityConfiguration: The code to print all the
properties is currently commented out
org.owasp.esapi.errors.ConfigurationException:
java.lang.reflect.InvocationTargetException Encoder class
(org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.