river-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Brouwer (JIRA)" <j...@apache.org>
Subject [jira] Updated: (RIVER-5) HTTMPMD URLs can be considered equal while they are not
Date Wed, 30 Jan 2008 20:25:37 GMT

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

Mark Brouwer updated RIVER-5:
-----------------------------

    Attachment:     (was: httpmd.patch)

> 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
>          Components: net_jini_url
>    Affects Versions: jtsk_2.1
>            Reporter: Mark Brouwer
>            Assignee: Mark Brouwer
>            Priority: Minor
>             Fix For: AR2
>
>         Attachments: test.zip
>
>
> 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.


Mime
View raw message