Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception #751
-
After upgrading to Spring Boot 2.6.6, getting Exception while canonicalize. Used the default validation.properties and ESAPI.properties file. Do we need to change any thing specific in the config. Code: ESAPI.encoder().canonicalize(value); org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
The template provided for bug creation is intended to help us help you better. Please consider the following:
Additionally, providing the full stacktrace from the exception thrown will make a significant difference. |
Beta Was this translation helpful? Give feedback.
-
In addition, if you upgraded from a previous version of ESAPI in the process, let us know what ESAPI version that was, as well as the one that is currently having a problem. I vaguely recall a few changes to that method that potentially could have broken something unintentionally, but we don't won't know what changes are significant unless we have something to compare it to. Lastly, if you can duplicate the problem in a short code snippet or an new test via a PR to EncoderTest, that would be ideal. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for checking... hope the following information helps. My guess is all with the property file, was there any thing new. Earlier app used esapi (2.0.1) and now upgraded to esapi (2.5.0.0). Made the change while upgrading Spring Boot to 2.6.6. Stack Trace with a simple class... ESAPI: WARNING: System property [org.owasp.esapi.opsteam] is not set ESAPI: SecurityConfiguration for Validator.ConfigurationFile.MultiValued not found in ESAPI.properties. Using default: false 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 |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help, Just mentioned all the required details above.... |
Beta Was this translation helpful? Give feedback.
-
The issue is related to your ESAPI.properties file. There are several updates to class locations and new properties that have changed since 2.0.1. If you have not already, please look through the Releases for the project. There are some highlights pointed out there. Additionally, you can find more specific items in the Documentation Directory of the baseline -- Specifically the files ending in -release-notes.txt The specific problem you're having is 2-fold.
It may be beneficial to pull down esapi-2.5.0.0-configuration.jar and work through merging any of your customizations from your 2.0.1 version |
Beta Was this translation helpful? Give feedback.
-
If you really want to use Log4J, you can of course do that via SLF4J and the (I think) slf4j-log4j12 jar. Also, thanks for providing the additional details. That saves us a lot of back-and-forth to gather information. This was perfect. |
Beta Was this translation helpful? Give feedback.
-
@kwwall I am converting this to a discussion, as this is not an issue with the behavior of the library but more related to version upgrade process for a specific environment. |
Beta Was this translation helpful? Give feedback.
The issue is related to your ESAPI.properties file. There are several updates to class locations and new properties that have changed since 2.0.1.
If you have not already, please look through the Releases for the project. There are some highlights pointed out there. Additionally, you can find more specific items in the Documentation Directory of the baseline -- Specifically the files ending in -release-notes.txt
The specific problem you're having is 2-fold.
Caused by: java.lang.ClassNotFoundException: org.owasp.esapi.reference.Log4JLogFactory
org…