sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konrad Windszus (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-7658) XSSApi.encodeForHtml doesn't leave unicode character escapes untouched
Date Wed, 09 May 2018 07:30:00 GMT

    [ https://issues.apache.org/jira/browse/SLING-7658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16468510#comment-16468510
] 

Konrad Windszus commented on SLING-7658:
----------------------------------------

The reason for this issue is actually the underlying {{org.owasp.encoder.Encode}} class which
will always replace {{&}} by {{&amp;}}.

> XSSApi.encodeForHtml doesn't leave unicode character escapes untouched
> ----------------------------------------------------------------------
>
>                 Key: SLING-7658
>                 URL: https://issues.apache.org/jira/browse/SLING-7658
>             Project: Sling
>          Issue Type: Bug
>          Components: XSS Protection API
>    Affects Versions: XSS Protection API 2.1.0
>            Reporter: Konrad Windszus
>            Priority: Major
>         Attachments: SLING-7658-v01.patch
>
>
> Whenever {{encodeForHtml}} is called with a string containing a unicode character escapes
(https://www.w3.org/International/questions/qa-escapes#answer), those are escaped incorrectly
again. I.e. {{&#9989;}} becomes {{&amp;#9989;}}.
> Compare with the discussion at https://www.mail-archive.com/dev@sling.apache.org/msg76863.html.
> Attached is a patch with a failing test.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message