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

Claus Ibsen resolved CAMEL-6853.
--------------------------------

    Resolution: Fixed

Thanks for reporting and the patch.

> UnsafeUriCharactersEncoder is missing hex digits
> ------------------------------------------------
>
>                 Key: CAMEL-6853
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6853
>             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
(v6.1#6144)

Reply via email to