URL Encoding using esapi.jar failed at Idp 3.1.1

Surinaidu Majji pioneer.suri at gmail.com
Thu Jun 25 05:46:35 EDT 2015


We have migrated from IdP 2.4.1 to 3.1.1, I could see there are lot of
library changes from 2.4.1 to 3.1.1 in the Idp folder. I found one
library(esapi-2.1.jar) which was there in 2.4.1 is not there in the 3.1.1.
        Since we used one of the API("ESAPI.encode()") from "esapi-2.1.jar"
to encode the url, we have placed the esapi-2.1.jar in the "IDP"
folder(idP-3.1.1).

At IdP 2.4 -We were encoding the url at login.JSP as below:
*ESAPI.encoder().encodeForHTMLAttribute(request.getParameter("actionUrl"))*

However ,At IdP 3.1.1 while encoding the same 'actionUrl' ,We are getting
the following error, even after placing the jar in the "IdP" folder.


*----------------------------------------- Error Message
----------------------------------------------------*
Loading ESAPI.properties via file I/O failed. Exception was:
java.io.FileNotFoundException
Attempting to load ESAPI.properties via the classpath.
ESAPI.properties could not be loaded by any means. Fail. Exception was:
java.lang.IllegalArgumentException: Failed to load ESAPI.properties as a
classloader resource.
Exception in thread "main" org.owasp.esapi.errors.ConfigurationException:
java.lang.reflect.InvocationTargetException SecurityConfiguration class
(org.owasp.esapi.reference.DefaultSecurityConfiguration) CTOR threw
exception.
    at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:129)
    at org.owasp.esapi.ESAPI.securityConfiguration(ESAPI.java:184)
    at org.owasp.esapi.ESAPI.encoder(ESAPI.java:99)
    at org.rancore.testJasp.TestEsapi.main(TestEsapi.java:59)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:86)
    ... 3 more
Caused by: org.owasp.esapi.errors.ConfigurationException: ESAPI.properties
could not be loaded by any means. Fail.
    at
org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfiguration(DefaultSecurityConfiguration.java:439)
    at
org.owasp.esapi.reference.DefaultSecurityConfiguration.<init>(DefaultSecurityConfiguration.java:227)
    at
org.owasp.esapi.reference.DefaultSecurityConfiguration.getInstance(DefaultSecurityConfiguration.java:75)
    ... 8 more
Caused by: java.lang.IllegalArgumentException: Failed to load
ESAPI.properties as a classloader resource.
    at
org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfigurationFromClasspath(DefaultSecurityConfiguration.java:667)
    at
org.owasp.esapi.reference.DefaultSecurityConfiguration.loadConfiguration(DefaultSecurityConfiguration.java:436)
    ... 10 more

*----------------------------------------- Error Message
----------------------------------------------------*

Queries:
1) Am i missing any jar in the idp-3.1 folder along with esapi.jar to
resolve above error?  OR
2) Do i need to download the  missing prop file -"ESAPI.properties" and
place them at esapi.jar and generate jar again ?
3) Do I need to make any explicit initialization to load "ESAPI.properties"
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20150625/01769974/attachment.html>


More information about the users mailing list