wg / scrypt

Java implementation of scrypt
Apache License 2.0
429 stars 145 forks source link

JAR library loading fails with '#' #48

Open Le1632 opened 6 years ago

Le1632 commented 6 years ago

The JarLibraryLoader has apparently a problem while loading if placed in a directory that contains special characters which have to be URL encoded.

For example, if the directory path contains "web#app" java.security.CodeSource.getLocaction().getPath() in line 59 will encode the '#' and return "web%23app". However, the java.util.jar.JarFile constructor expects a (not encoded) filename and consequently fails to load from the nonexistent directory "web%23app". A simple java.net.URLDecoder.decode() in line 59 would fix this issue.

I can create a pull request upon request.