camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-6853) UnsafeUriCharactersEncoder is missing hex digits
Date Fri, 11 Oct 2013 11:46:05 GMT


Claus Ibsen resolved CAMEL-6853.

    Resolution: Fixed

Thanks for reporting and the patch.

> UnsafeUriCharactersEncoder is missing hex digits
> ------------------------------------------------
>                 Key: CAMEL-6853
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.12.1
>            Reporter: Thomas Konstantinides
>            Assignee: Claus Ibsen
>             Fix For: 2.11.3, 2.12.2, 2.13.0
>         Attachments: UnsafeUriCharactersEncoder.patch
> The class org.apache.camel.util.UnsafeUriCharactersEncoder in camel-core has a char[]
HEX_DIGITS which includes hex digits that can be used in encoded urls following the % sign.
However the char[] only contains the uppercase hexadecimal digits 'A' through 'F' which (following
RFC 3986, chapter 2.1) are equivalent to the lowercase digits 'a' through 'f' in percent-encoding
used in URIs. 
> So the char[] should also contain the lowercase digits 'a' through 'f', because otherwise
the class does not work correctly in cases where URLs with already encoded characters having
lowercase hex digits are encoded (e.g. URL with %3c). For these URLs the % sign is encoded
once again (making it %253c in the example).
> The provided patch adds the lowercase hex digits to the HEX_DIGITS char[].
> Regards,
> Thomas

This message was sent by Atlassian JIRA

View raw message