.lang.IllegalArgumentException; exception message 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:185)
at org.owasp.esapi.ESAPI.encoder(ESAPI.java:101)
at esapi_demo.App.main(App.java:15)
PS D:\DevelopmentEnvironment\Workspaces\JavaProjects\esapi_demo\build\libs>java -jar .\esapi_demo.jar
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: D:\DevelopmentEnvironment\Workspaces\JavaProjects\esapi_demo\build\libs\ESAPI.properties
ESAPI: Not found in SystemResource Directory/resourceDirectory: .esapi\ESAPI.properties
ESAPI: Not found in 'user.home' (C:\Users\XINGYUN) directory: C:\Users\XINGYUN\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: D:\DevelopmentEnvironment\Workspaces\JavaProjects\esapi_demo\build\libs\validation.properties
ESAPI: Not found in SystemResource Directory/resourceDirectory: .esapi\validation.properties
ESAPI: Not found in 'user.home' (C:\Users\XINGYUN) directory: C:\Users\XINGYUN\esapi\validation.properties
ESAPI: Loading validation.properties via file I/O failed.
ESAPI: Attempting to load validation.properties via the classpath.
ESAPI: SUCCESSFULLY LOADED validation.properties via the CLASSPATH from '/ (root)' using current thread context class loader!
<script>alert('xss')</script>
[2021-01-24 18:32:46] [HTMLValidationRule] [EVENT FAILURE Anonymous:@unknown -> /ExampleApplication/HTMLValidationRule] ESAPI property Validator.HtmlValidationConfigurationFile not set, using default value: antisamy-esapi.xml
ESAPI: Attempting to load antisamy-esapi.xml as resource file via file I/O.
ESAPI: Not found in 'org.owasp.esapi.resources' directory or file not readable: D:\DevelopmentEnvironment\Workspaces\JavaProjects\esapi_demo\build\libs\antisamy-esapi.xml
ESAPI: Not found in SystemResource Directory/resourceDirectory: .esapi\antisamy-esapi.xml
ESAPI: Not found in 'user.home' (C:\Users\XINGYUN) directory: C:\Users\XINGYUN\esapi\antisamy-esapi.xml
[2021-01-24 18:32:46] [HTMLValidationRule] [EVENT FAILURE Anonymous:@unknown -> /ExampleApplication/HTMLValidationRule] Loading antisamy-esapi.xml from classpaths
[2021-01-24 18:32:46] [HTMLValidationRule] [EVENT FAILURE Anonymous:@unknown -> /ExampleApplication/HTMLValidationRule] SUCCESSFULLY LOADED antisamy-esapi.xml via the CLASSPATH from
'/ (root)' using current thread context class loader!
[2021-01-24 18:32:46] [IntrusionDetector] [SECURITY FAILURE Anonymous:@unknown -> /ExampleApplication/IntrusionDetector] Invalid HTML input does not follow rules in antisamy-esapi.xml: context=get safe html errors=[出于安全的原因,标记script不被允许。此标记不应该影响输入的显示。]
[2021-01-24 18:32:46] [null ] errororg.owasp.esapi.errors.ValidationException: get safe html: Invalid HTML input