Thomas Konstantinides created CAMEL-6853:
--------------------------------------------
Summary: 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
The class UnsafeUriCharactersEncoder 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)