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

A space in the filepath of the Eclipse workspace breaks WAF rules #70

Closed
meg23 opened this issue Nov 13, 2014 · 5 comments
Closed

A space in the filepath of the Eclipse workspace breaks WAF rules #70

meg23 opened this issue Nov 13, 2014 · 5 comments

Comments

@meg23
Copy link

meg23 commented Nov 13, 2014

From manico.james@gmail.com on November 20, 2009 08:48:43

Anytime a developers workspace has a space anywhere in the filepath, like

C:\Documents and Settings\Jim\workspace_35

The WAF tests will all break.

Original issue: http://code.google.com/p/owasp-esapi-java/issues/detail?id=60

@meg23
Copy link
Author

meg23 commented Nov 13, 2014

From chrisisbeef on December 01, 2009 23:57:55

Tentatively adding this to 2.0 - Arshan, if you have time, I think this is a
worthwhile fix to get in, if not we can reschedule for 2.1

Labels: Milestone-Release2.0

@meg23
Copy link
Author

meg23 commented Nov 13, 2014

From cyounk...@gmail.com on January 17, 2010 17:33:06

This does not only affect the WAF. I'm seeing tests fail in the AccessController and
Validator in addition to the WAF, but only when the workspace path has a space in it.

I believe this is part of a larger issue searching for the resources directory when
the workspace has a space in it. This is what I'm seeing:

getValidDirectoryPath
Seeking ESAPI.properties
Not found in 'org.owasp.esapi.resources' directory or file not readable:
C:\Documents and Settings\Administrator\Desktop\Workspace\ESAPI\ESAPI.properties
Not found in SystemResource Directory/resourceDirectory (this should never happen):
C:\Documents%20and%20Settings\Administrator\Desktop\Workspace\ESAPI\target\test-classes.esapi\ESAPI.properties
Not found in SystemResource Directory/.esapi(this should never happen):
C:\Documents%20and%20Settings\Administrator\Desktop\Workspace\ESAPI\target\test-classes.esapi\ESAPI.properties
Not found in SystemResource Directory: ESAPI.properties
Not found in 'user.home' directory: C:\Documents and
Settings\Administrator.esapi\ESAPI.properties


So it looks like it's not finding the resources directory in the jar at all. After
running all the tests it has made a .esapi directory at C:\Documents and
Settings\Administrator.esapi.

Here are what I think are the relevant code snippets. I can't quite see what the
problem is though.

private static String customDirectory = System.getProperty("org.owasp.esapi.resources");
...
f = new File( customDirectory, filename );
if ( customDirectory != null && f.canRead() )
...

@meg23
Copy link
Author

meg23 commented Nov 13, 2014

From manico.james@gmail.com on January 17, 2010 18:22:16

Labels: Milestone-Release1.4.3

@meg23
Copy link
Author

meg23 commented Nov 13, 2014

From craig.yo...@gtempaccount.com on January 17, 2010 21:48:41

Fixed in r963 for 2.0.

Labels: -Milestone-Release2.0

@meg23
Copy link
Author

meg23 commented Nov 13, 2014

From manico.james@gmail.com on January 17, 2010 22:00:26

Status: Fixed

@meg23 meg23 closed this as completed Nov 13, 2014
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

1 participant