Issue Details (XML | Word | Printable)

Key: FWK-103
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Antoine Véret
Reporter: David Nault
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JCaptcha Framework

FileReaderRandomBackgroundGenerator should URL-decode the result of url.getFile()

Created: 07/Nov/08 03:23 AM   Updated: 04/Feb/09 12:04 AM   Resolved: 04/Feb/09 12:04 AM
Component/s: None
Affects Version/s: 1.0_RC4
Fix Version/s: 1.0


 Description  « Hide
Looks at this code:
    URL url = FileReaderRandomBackgroundGenerator.class.getClassLoader().getResource(rootPath);
    ...
    dir = new File(url.getFile());

If the path contains a space, hash mark (#), or any other character normally escaped by url-encoding, the result of url.getFile() will contain url-encoding escape sequences for those characters. For example, If the path is "/tmp/foo#/my projects/test", url.getFile() will return "/tmp/foo%23/my%20projects/test".

The fix is to url-decode the string before creating the File.




Sort Order: Ascending order - Click to sort in descending order
David Nault added a comment - 07/Nov/08 03:35 AM
This issue also affects trunk