You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2024/05/26 16:30:00 UTC

[jira] [Resolved] (CXF-9015) Typo in JsonMapObjectReaderWriter treats \h as a special character instead of \n

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

Andriy Redko resolved CXF-9015.
-------------------------------
    Resolution: Fixed

> Typo in JsonMapObjectReaderWriter treats \h as a special character instead of \n
> --------------------------------------------------------------------------------
>
>                 Key: CXF-9015
>                 URL: https://issues.apache.org/jira/browse/CXF-9015
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.5.8, 3.6.3, 4.0.4
>            Reporter: Craig Perkins
>            Priority: Minor
>             Fix For: 3.5.9, 4.1.0, 4.0.5, 3.6.4
>
>
> The JsonMapObjectReaderWriter class maintains a list of [ESCAPED_CHARS|https://github.com/apache/cxf/blob/main/rt/rs/extensions/json-basic/src/main/java/org/apache/cxf/jaxrs/json/basic/JsonMapObjectReaderWriter.java#L45-L56] which includes special characters that need to be escaped like the newline (`\n`) and tab (`\t`) characters. This list also includes `\h`, but I can't find any links to official documentation about this character needing to be escaped. 
> According to this [SO post|https://stackoverflow.com/a/27516892] which details escaped characters in JSON, it does not include `\h` in this list. 
> Issue in OpenSearch where this issue is discussed: [https://github.com/opensearch-project/security/issues/2531#issuecomment-2111309193]
>  
> PR to address the issue with more details: [https://github.com/apache/cxf/pull/1872]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)