You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Mark Brouwer (JIRA)" <ji...@apache.org> on 2007/05/07 09:10:16 UTC

[jira] Work started: (RIVER-5) HTTMPMD URLs can be considered equal while they are not

     [ https://issues.apache.org/jira/browse/RIVER-5?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on RIVER-5 started by Mark Brouwer.

> HTTMPMD URLs can be considered equal while they are not
> -------------------------------------------------------
>
>                 Key: RIVER-5
>                 URL: https://issues.apache.org/jira/browse/RIVER-5
>             Project: River
>          Issue Type: Bug
>            Reporter: Mark Brouwer
>         Assigned To: Mark Brouwer
>            Priority: Minor
>
> According to the specification of {{net.jini.url.httpmd.Handler}} the message digest may contain the '{{,}}' (comma) character, however the parsing logic in {{net.jini.url.httpmd.Handler.sameFile(URL, URL)}} assumes the first comma in the parameter part to be the start of the comment. As a consequence the following piece of code (requires the installation of a security provider with support for the non existing message digest algorithms {{MD5,0}} and {{MD5,10}}) yields the wrong result:
> {noformat:nopanel}
> URL url1 = new URL("httpmd://localhost:80/;md5,0=7be207c7111e459eeea1c9b3d04f1667,.jar");
> URL url2 = new URL("HTTPMD://localhost/;md5,10=7be207c7111e459eeea1c9b3d04f1667");
> System.out.println("equals: " + url1.equals(url2));
> {noformat}
> The output is "{{true}}" while it is of course obvious that the output should be "{{false}}" here.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.