You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/07 13:33:00 UTC

[jira] [Commented] (SLING-7476) Exceptions should be logged correctly

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

ASF GitHub Bot commented on SLING-7476:
---------------------------------------

raducotescu closed pull request #1: SLING-7476 - Exceptions should be logged correctly
URL: https://github.com/apache/sling-org-apache-sling-xss/pull/1
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Exceptions should be logged correctly
> -------------------------------------
>
>                 Key: SLING-7476
>                 URL: https://issues.apache.org/jira/browse/SLING-7476
>             Project: Sling
>          Issue Type: Bug
>          Components: XSS Protection API
>    Affects Versions: XSS Protection API 2.0.4
>            Reporter: Tobias Bocanegra
>            Assignee: Radu Cotescu
>            Priority: Major
>
> when filtering a source that is larger than 200k, the xss api fails with:
> {noformat}
> java.lang.RuntimeException: Unable to scan input
> 	at org.apache.sling.xss.impl.HtmlToHtmlContentContext.filter(HtmlToHtmlContentContext.java:73)
> 	at org.apache.sling.xss.impl.XSSFilterImpl.filter(XSSFilterImpl.java:190)
> 	at org.apache.sling.xss.impl.XSSFilterImpl.filter(XSSFilterImpl.java:123)
> 	at org.apache.sling.xss.impl.XSSAPIImpl.filterHTML(XSSAPIImpl.java:466)
> 	at org.apache.sling.xss.impl.XSSAPIImplTest.testFilterLargeHTML(XSSAPIImplTest.java:223)
> {noformat}
> Test:
> {code}
>     @Test
>     public void testFilterLargeHTML() {
>         final int SIZE = 210000;
>         StringBuilder b = new StringBuilder(SIZE);
>         while (b.length() < SIZE) {
>             b.append("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at enim et dui egestas accumsan amet.");
>         }
>         String source = b.toString();
>         TestCase.assertEquals("Filtering large source", source, xssAPI.filterHTML(source));
>     }
> {code}



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