On 02/22/11 03:00 AM, Charles Lee wrote:
:
Hi,

A quick patch could be:

diff --git src/share/classes/java/net/SocketPermission.java
src/share/classes/java/net/SocketPermission.java
--- src/share/classes/java/net/SocketPermission.java
+++ src/share/classes/java/net/SocketPermission.java
@@ -817,8 +817,13 @@

if (thisHost == null)
return false;
- else
- return thisHost.equalsIgnoreCase(thatHost);
+ else {
+ if (this.wildcard) {
+ return thatHost.endsWith(this.cname);
+ } else {
+ return thisHost.equalsIgnoreCase(thatHost);
+ }
+ }

}

I filed CR 7021280: "SocketPermission trustProxy should accept wildcards" for this issue.

I'll apply the patch to my JDK7 personal repo and run some initial tests.

-Chris.

Reply via email to