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

SEC-1239: Special characters in JAAS config file location #1487

Closed
spring-projects-issues opened this issue Sep 6, 2009 · 1 comment
Closed
Labels
in: core An issue in spring-security-core type: bug A general bug type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

Gérald Quintana (Migrated from SEC-1239) said:

Given a JaasAuthenticationProvider declared like this:









I get the folowing exception:
java.lang.SecurityException: D:\Tomcat%205.5.23\webapps\myapp\WEB-INF\classes\jaas.config (The system cannot find the path specified)

The problem stems from

  • the fact that there is a special character (%20 is "space") in my Tomcat location.
  • the way Resouce is converted to String in method private void configureJaasUsingLoop():
    String loginConfigUrl = loginConfig.getURL().toString();
@spring-projects-issues
Copy link
Author

Luke Taylor said:

I've converted the Resource to a File before calling getURL() on it. File.get().URL.toString() is encoded differently from the one obtained from Resource.getURL().toString(). More importantly it is compatible with the current behaviour of com.sun.security.auth.login.ConfigFile which just substitutes "/" characters in the URL for the file separator character, before attempting to use it to load the file. I think the problem essentially lies with the behaviour of ConfigFile, but this seems to fix it.

@spring-projects-issues spring-projects-issues added in: core An issue in spring-security-core Closed type: bug A general bug type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 3.0.0 RC1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: bug A general bug type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

1 participant