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

spring-issuemaster opened this Issue Sep 6, 2009 · 1 comment

1 participant


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();

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 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-issuemaster spring-issuemaster 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