bigbadhacker / proxy-vole

Automatically exported from code.google.com/p/proxy-vole
0 stars 0 forks source link

shExpMatch for IP address #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Configure PAC file with a rule shExpMatch (host, "10.*")
2.Try to browse https://202.310.65.6/

What is the expected output? What do you see instead?
Expected: "202.310.65.6" should not match "10.*"
Actual: "202.310.65.6" matches "10.*"

What version of the product are you using? On what operating system?
proxy-vole_20131209

Please provide any additional information below.

It works after making following change in PacScriptMethods
public boolean shExpMatch(String str, String shexp) {
     return str.matches(shexp.replaceAll("\\*", ".*"));
}

Original issue reported on code.google.com by dharmara...@gmail.com on 20 Nov 2014 at 12:43

GoogleCodeExporter commented 9 years ago
Hi,
I now looked into this issue. I fixed it in the TRUNK in the repository.
You have to check out that one and build it on your own as I can no longer post 
binary releases to google code. 

The TRUNK version is very stable and has also other bugfixes.
I improved my parsing code with your test case. Your proposed solution has the 
side effect that it would allow all kind of regular expressions which is not 
what this method should do ;-) 

Thanks for reporting this issue,
- Rossi

Original comment by rosstaus...@googlemail.com on 9 Feb 2015 at 9:10

GoogleCodeExporter commented 9 years ago
Thanks Rossi. I was able to build from TRUNK but only with Java 1.8 compiler. 
With older Java, GnomeDConfProxySearchStrategy class does not compile. 

Original comment by dharmara...@gmail.com on 12 Feb 2015 at 8:07

GoogleCodeExporter commented 9 years ago
Hi,
I checked that one in just recently and it is not yet used at all.
Sorry this slipped just in. So basically the easiest thing is to remove that 
class and to compile then. I will fix it tomorrow to be compatible with older 
Java versions too.

Anyhow thanks for reporting this.

- Rossi

Original comment by rosstaus...@googlemail.com on 12 Feb 2015 at 10:26