RFR: 8029354: URLPermission.<init> throws llegalArgumentException: Invalid characters in hostname

Weijun Wang weijun.wang at oracle.com
Mon Dec 2 00:29:05 PST 2013


Hi Michael

  492         boolean implies(Authority other) {
  493             return userinfo.equals(other.userinfo) &&
  494                    impliesHostrange(other) && impliesPortrange(other);
  495         }

This means http://example.com does not imply http://someone@example.com. 
Is this intended?

Also,

   68  * <i>userinfo</i> is optional and has no special significance in 
this class.

It seems that field has some significance.

Thanks
Max



On 11/30/13, 1:06, Michael McMahon wrote:
> Hi,
>
> java.net.URLPermission does not currently take account of the "userinfo"
> component
> in the authority of a URL. So, it does not accept URLs of the form
> "http://username@host/blah"
>
> http://cr.openjdk.java.net/~michaelm/8029354/webrev.1/
>
> which includes a small spec change to account for this. Userinfo needs
> to be case-sensitive
> for comparison, hashCode() etc.
>
> Thanks,
> Michael
>
>



More information about the net-dev mailing list