You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2014/07/07 20:30:34 UTC

[jira] [Updated] (LANG-1022) NumericEntityUnescaper.translate throws an IllegalArgumentException if entityValue > MAX_CODE_POINT

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

Benedikt Ritter updated LANG-1022:
----------------------------------

    Fix Version/s: Discussion

> NumericEntityUnescaper.translate throws an IllegalArgumentException if entityValue > MAX_CODE_POINT
> ---------------------------------------------------------------------------------------------------
>
>                 Key: LANG-1022
>                 URL: https://issues.apache.org/jira/browse/LANG-1022
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.text.translate.*
>            Reporter: Miquel
>            Priority: Minor
>             Fix For: Discussion
>
>
> We found that using the function StringEscapeUtils.unescapeHtml4 crashes if the argument is "&#14844069;" and throws an IllegalArgumentException.
> This happens because internally it calls the function NumericEntityUnescaper.translate and doesn't check if the value is bigger than 0x10FFFF (MAX_CODE_POINT) that is a check inside Character.toChar.
> Maybe we need to check that the entity value is less than Char.MAX_CODE_POINT.



--
This message was sent by Atlassian JIRA
(v6.2#6252)