You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2021/01/14 12:31:00 UTC
[jira] [Resolved] (FELIX-6371) JSONConfigurationWriter does not
escape backslash and other chars
[ https://issues.apache.org/jira/browse/FELIX-6371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved FELIX-6371.
-------------------------------------
Resolution: Fixed
added some more characters https://github.com/apache/felix-dev/commit/d641cd29703ee6fff418f42c0dd807bc2a87a358
Not all unicode characters are handled with this but that should be good enough
> JSONConfigurationWriter does not escape backslash and other chars
> -----------------------------------------------------------------
>
> Key: FELIX-6371
> URL: https://issues.apache.org/jira/browse/FELIX-6371
> Project: Felix
> Issue Type: Bug
> Components: Inventory, Web Console
> Affects Versions: Inventory-1.0.6, webconsole-4.6.0
> Reporter: Volo Myhal
> Assignee: Carsten Ziegeler
> Priority: Major
> Fix For: webconsole-4.6.2, inventory-1.0.8
>
>
> _JSONConfigurationWriter.write_ method currently escapes/handles only three input characters: dblquote, \n and \r.
> As a result, it produces invalid JSON strings, for example when Windows path is present in /system/console/status-slingsettings/, which caused JSON parsers to fail.
> It should escape the backslash and other characters according to [1].
> [0] [https://github.com/apache/felix-dev/blob/master/inventory/src/main/java/org/apache/felix/inventory/impl/helper/JSONConfigurationWriter.java#L117]
> [1] [https://greenbytes.de/tech/webdav/rfc8259.html#rfc.section.7]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)