Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESAPI.securityConfiguration().setResourceDirectory(...) not considered anymore in loading of configuration via classloader #746

Open
nettermensch opened this issue Oct 10, 2022 · 0 comments
Assignees

Comments

@nettermensch
Copy link

#745

We set the directory for locating the ESAPI.properties within our resources in the following way.

String` rd = findConfigurationDirectory(...); // <== result e.g. is "esapi/v25/" ESAPI.securityConfiguration().setResourceDirectory(rd);

Using ESAPI <= version 2.1 this perfectly worked fine. It does not work from ESAPI >= 2.2 on.
After scanning the code of "DefaultSecurityConfiguration" I see the following difference in method "loadConfigurationFromClasspath":

Version 2.1
in = currentLoader.getResourceAsStream(this.resourceDirectory + "/" + fileName);

Version >= 2.2
in = currentLoader.getResourceAsStream(DefaultSearchPath.RESOURCE_DIRECTORY.value() + fileName);

Please check details from discussion #745 . As mentioned in the discussion there is a workaround for flexibly loading the configuration.

@kwwall kwwall self-assigned this Oct 10, 2022
kwwall referenced this issue Oct 13, 2022
…adequately updated in the future, and upped JVM compliance level to 1.7 since we already decided that 1.6 is more than defunct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants