SocketPermission's implies() interesting behavior
neil.richards at ngmr.net
Wed Mar 9 08:02:37 PST 2011
On 1 March 2011 09:18, Chris Hegarty <chris.hegarty at oracle.com> wrote:
> Can you please take a look at this change, CR 7021280: "SocketPermission
> trustProxy should accept wildcards".
> This patch came from Charles (cc'ed), and I agree with the changes. Can you
> please take a look and give your feedback.
In the suggested fix, I see that the comparison becomes
'thatHost.endsWith(this.cname)' if 'this.wildcard' is 'true'.
Prior to the change, the comparison was (always)
So, on the surface, it looks like a case-insensitive comparison -
String.equalsIgnoreCase() - has been replaced (when 'this.wildcard' is
'true') with a case-sensitive comparison - String.endsWith().
Is there a reason why this change in case sensitivity is not a problem
in this instance, or does the suggested fix need to be reworked to
make the new comparison (also) case-insensitive ?
Unless stated above:
IBM email: neil_richards at uk.ibm.com
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
More information about the net-dev