java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

Atlassian JIRA | Lukáš Lalinský | 3 years ago
  1. 0

    I'm not sure in which exact situations this happens, but if you add a comment like this to a pull request, you end up with an error and the pull request can no longer be cleanly open. {quote} xxx "failed at <Profile at 0x54234845>" {quote} Stash fails with this error: {code} 2013-12-06 10:23:39,979 ERROR [http-bio-127.0.0.1-7990-exec-3] llalinsky 623x91046x0 5v6e7f 195.46.73.2,127.0.0.1 "GET /rest/api/latest/projects/WC/repos/deploy/pull-requests/46/activities HTTP/1.0" c.a.s.r.e.UnhandledExceptionMapper Unhandled exception while processing REST call java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean(MarkupFactoryImpl.java:98) ~[na:na] at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.markup(MarkupFactoryImpl.java:91) ~[na:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:78) ~[stash-service-impl-2.9.2.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:75) ~[stash-service-impl-2.9.2.jar:na] at com.atlassian.markup.renderer.impl.MarkupRendererImpl.render(MarkupRendererImpl.java:42) ~[atlassian-markup-renderer-0.2.3.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService.render(DefaultMarkupService.java:58) ~[stash-service-impl-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.render(DefaultMarkupEnricher.java:42) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.access$000(DefaultMarkupEnricher.java:14) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher$1.apply(DefaultMarkupEnricher.java:31) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:193) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.enrich(DefaultMarkupEnricher.java:26) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.internal.rest.filter.MarkupResourceFilterFactory$1.filter(MarkupResourceFilterFactory.java:23) ~[stash-rest-2.9.2.jar:na] at com.atlassian.stash.rest.util.AbstractResourceFilterFactory$ResourceFilterEx.filter(AbstractResourceFilterFactory.java:49) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) [applinks-plugin-4.0.5_1384118240000.jar:na] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:90) [StashAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) [atlassian-trusted-apps-core-3.0.2.jar:na] at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:61) [atlassian-oauth-service-provider-plugin-1.9.0-m3_1384118242000.jar:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:72) [stash-service-impl-2.9.2.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_20] at java.lang.Thread.run(Thread.java:636) [na:1.6.0_20] ... 225 frames trimmed Caused by: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.owasp.validator.html.scan.AntiSamyDOMScanner.scan(AntiSamyDOMScanner.java:174) ~[na:na] at org.owasp.validator.html.AntiSamy.scan(AntiSamy.java:113) ~[na:na] at org.owasp.validator.html.AntiSamy.scan(AntiSamy.java:92) ~[na:na] at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean(MarkupFactoryImpl.java:96) ~[na:na] ... 27 common frames omitted Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.apache.xerces.dom.CoreDocumentImpl.createAttribute(Unknown Source) ~[xercesImpl-2.9.1.jar:na] at org.apache.xerces.dom.ElementImpl.setAttribute(Unknown Source) ~[xercesImpl-2.9.1.jar:na] at org.cyberneko.html.parsers.DOMFragmentParser.startElement(DOMFragmentParser.java:433) ~[nekohtml-1.9.7.jar:na] at org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1019) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:652) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.java:136) ~[nekohtml-1.9.7.jar:na] at org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBinder.java:278) ~[nekohtml-1.9.7.jar:na] at org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2680) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2012) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:910) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.parsers.DOMFragmentParser.parse(DOMFragmentParser.java:166) ~[nekohtml-1.9.7.jar:na] at org.owasp.validator.html.scan.AntiSamyDOMScanner.scan(AntiSamyDOMScanner.java:172) ~[na:na] ... 30 common frames omitted {code}

    Atlassian JIRA | 3 years ago | Lukáš Lalinský
    java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
  2. 0

    I'm not sure in which exact situations this happens, but if you add a comment like this to a pull request, you end up with an error and the pull request can no longer be cleanly open. {quote} xxx "failed at <Profile at 0x54234845>" {quote} Stash fails with this error: {code} 2013-12-06 10:23:39,979 ERROR [http-bio-127.0.0.1-7990-exec-3] llalinsky 623x91046x0 5v6e7f 195.46.73.2,127.0.0.1 "GET /rest/api/latest/projects/WC/repos/deploy/pull-requests/46/activities HTTP/1.0" c.a.s.r.e.UnhandledExceptionMapper Unhandled exception while processing REST call java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean(MarkupFactoryImpl.java:98) ~[na:na] at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.markup(MarkupFactoryImpl.java:91) ~[na:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:78) ~[stash-service-impl-2.9.2.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:75) ~[stash-service-impl-2.9.2.jar:na] at com.atlassian.markup.renderer.impl.MarkupRendererImpl.render(MarkupRendererImpl.java:42) ~[atlassian-markup-renderer-0.2.3.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService.render(DefaultMarkupService.java:58) ~[stash-service-impl-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.render(DefaultMarkupEnricher.java:42) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.access$000(DefaultMarkupEnricher.java:14) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher$1.apply(DefaultMarkupEnricher.java:31) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:193) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.enrich(DefaultMarkupEnricher.java:26) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.stash.internal.rest.filter.MarkupResourceFilterFactory$1.filter(MarkupResourceFilterFactory.java:23) ~[stash-rest-2.9.2.jar:na] at com.atlassian.stash.rest.util.AbstractResourceFilterFactory$ResourceFilterEx.filter(AbstractResourceFilterFactory.java:49) ~[stash-rest-common-2.9.2.jar:na] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) [applinks-plugin-4.0.5_1384118240000.jar:na] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:90) [StashAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) [atlassian-trusted-apps-core-3.0.2.jar:na] at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:61) [atlassian-oauth-service-provider-plugin-1.9.0-m3_1384118242000.jar:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:72) [stash-service-impl-2.9.2.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.6.0_20] at java.lang.Thread.run(Thread.java:636) [na:1.6.0_20] ... 225 frames trimmed Caused by: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.owasp.validator.html.scan.AntiSamyDOMScanner.scan(AntiSamyDOMScanner.java:174) ~[na:na] at org.owasp.validator.html.AntiSamy.scan(AntiSamy.java:113) ~[na:na] at org.owasp.validator.html.AntiSamy.scan(AntiSamy.java:92) ~[na:na] at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean(MarkupFactoryImpl.java:96) ~[na:na] ... 27 common frames omitted Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.apache.xerces.dom.CoreDocumentImpl.createAttribute(Unknown Source) ~[xercesImpl-2.9.1.jar:na] at org.apache.xerces.dom.ElementImpl.setAttribute(Unknown Source) ~[xercesImpl-2.9.1.jar:na] at org.cyberneko.html.parsers.DOMFragmentParser.startElement(DOMFragmentParser.java:433) ~[nekohtml-1.9.7.jar:na] at org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1019) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:652) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.java:136) ~[nekohtml-1.9.7.jar:na] at org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBinder.java:278) ~[nekohtml-1.9.7.jar:na] at org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2680) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2012) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:910) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) ~[nekohtml-1.9.7.jar:1.9.7] at org.cyberneko.html.parsers.DOMFragmentParser.parse(DOMFragmentParser.java:166) ~[nekohtml-1.9.7.jar:na] at org.owasp.validator.html.scan.AntiSamyDOMScanner.scan(AntiSamyDOMScanner.java:172) ~[na:na] ... 30 common frames omitted {code}

    Atlassian JIRA | 3 years ago | Lukáš Lalinský
    java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
  3. 0

    *Steps to produce* # Drop a comment in Stash pull request contains this: {code} <char - > {code} Note that 'char' can be any character or word. # Click 'Comment' or 'Preview'. *Results* A popup error will appear and the following will appear in the logs: {code} 2013-09-04 21:14:17,715 ERROR [http-bio-7990-exec-5] admin 1274x238x1 1py0zr1 0:0:0:0:0:0:0:1 "POST /rest/api/latest/markup/preview HTTP/1.1" c.a.s.r.e.UnhandledExceptionMapper Unhandled exception while processing REST call java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean(MarkupFactoryImpl.java:98) ~[na:na] at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.markup(MarkupFactoryImpl.java:91) ~[na:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:78) ~[stash-service-impl-2.7.0.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:75) ~[stash-service-impl-2.7.0.jar:na] at com.atlassian.markup.renderer.impl.MarkupRendererImpl.render(MarkupRendererImpl.java:38) ~[atlassian-markup-renderer-0.2.2.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService.render(DefaultMarkupService.java:58) ~[stash-service-impl-2.7.0.jar:na] at sun.reflect.GeneratedMethodAccessor478.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_25] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] {code}

    Atlassian JIRA | 3 years ago | Omar Al-Safi [Atlassian]
    java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    *Steps to produce* # Drop a comment in Stash pull request contains this: {code} <char - > {code} Note that 'char' can be any character or word. # Click 'Comment' or 'Preview'. *Results* A popup error will appear and the following will appear in the logs: {code} 2013-09-04 21:14:17,715 ERROR [http-bio-7990-exec-5] admin 1274x238x1 1py0zr1 0:0:0:0:0:0:0:1 "POST /rest/api/latest/markup/preview HTTP/1.1" c.a.s.r.e.UnhandledExceptionMapper Unhandled exception while processing REST call java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean(MarkupFactoryImpl.java:98) ~[na:na] at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.markup(MarkupFactoryImpl.java:91) ~[na:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:78) ~[stash-service-impl-2.7.0.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:75) ~[stash-service-impl-2.7.0.jar:na] at com.atlassian.markup.renderer.impl.MarkupRendererImpl.render(MarkupRendererImpl.java:38) ~[atlassian-markup-renderer-0.2.2.jar:na] at com.atlassian.stash.internal.markup.DefaultMarkupService.render(DefaultMarkupService.java:58) ~[stash-service-impl-2.7.0.jar:na] at sun.reflect.GeneratedMethodAccessor478.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_25] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.2.3.RELEASE.jar:3.2.3.RELEASE] {code}

    Atlassian JIRA | 3 years ago | Omar Al-Safi [Atlassian]
    java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
  6. 0

    When we have a set of doc files in a directory and we try to import the pages do not get created and the following error display in the logs: {code} 2014-07-01 14:49:44,970 ERROR [http-bio-8090-exec-3] [confluence.spaces.actions.ImportPagesAction] execute An error occurred importing: C:\Users\dluvison\Downloads\CSP126202\Test.docx -- space: 491521 | url: /spaces/doimportpages.action | userName: admin | referer: http://confluence:8090/spaces/importpages.action?key=TI | action: doimportpages java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at com.atlassian.confluence.content.render.xhtml.PolicyConfiguredCleaner.antiSamyClean(PolicyConfiguredCleaner.java:221) at com.atlassian.confluence.content.render.xhtml.PolicyConfiguredCleaner.cleanEntityBody(PolicyConfiguredCleaner.java:160) at com.atlassian.confluence.content.render.xhtml.PolicyConfiguredCleaner.cleanQuietlyWithLogging(PolicyConfiguredCleaner.java:171) at com.atlassian.confluence.content.render.xhtml.PolicyConfiguredCleaner.cleanQuietly(PolicyConfiguredCleaner.java:87) at com.atlassian.confluence.content.render.xhtml.storage.XhtmlCleaningInterceptor$1.clean(XhtmlCleaningInterceptor.java:31) at com.atlassian.confluence.core.BodyContent.cleanBody(BodyContent.java:134) at com.atlassian.confluence.content.render.xhtml.storage.XhtmlCleaningInterceptor.cleanBodyContents(XhtmlCleaningInterceptor.java:115) at com.atlassian.confluence.content.render.xhtml.storage.XhtmlCleaningInterceptor.onFlushDirty(XhtmlCleaningInterceptor.java:63) at com.atlassian.confluence.core.persistence.hibernate.CompositeInterceptor.onFlushDirty(CompositeInterceptor.java:43) at net.sf.hibernate.impl.SessionImpl.flushEntity(SessionImpl.java:2582) ... at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.owasp.validator.html.scan.AntiSamyDOMScanner.scan(AntiSamyDOMScanner.java:174) at org.owasp.validator.html.AntiSamy.scan(AntiSamy.java:113) at org.owasp.validator.html.AntiSamy.scan(AntiSamy.java:92) at com.atlassian.confluence.content.render.xhtml.PolicyConfiguredCleaner.antiSamyClean(PolicyConfiguredCleaner.java:202) ... 320 more Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source) at org.cyberneko.html.parsers.DOMFragmentParser.startElement(DOMFragmentParser.java:432) at org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1136) .... at org.cyberneko.html.parsers.DOMFragmentParser.parse(DOMFragmentParser.java:167) at org.owasp.validator.html.scan.AntiSamyDOMScanner.scan(AntiSamyDOMScanner.java:172) ... 323 more {code} h4. Steps to Reproduce: # Use Microsoft Office and create 4 doc/docx files with some content on it. # Save into a local directory. # Create a Space. # Go to Space Tools > Content Tools > Import tab # In import directory put the path to the directory where you saved the files created in step 1. # Click in Import. # The spaces will not be created. (i) Tested With FF and Chrome using customer data. h4. Workaround # Create a Blank Page. # Click In Tools > Import From Word Document # Select your Word Document.

    Atlassian JIRA | 2 years ago | Deividi Luvison [Atlassian]
    java.lang.RuntimeException: org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      org.owasp.validator.html.ScanException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

      at com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean()
    2. com.atlassian.markup
      MarkupFactoryImpl$AntiSamyParser.markup
      1. com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.clean(MarkupFactoryImpl.java:98)[na:na]
      2. com.atlassian.markup.internal.MarkupFactoryImpl$AntiSamyParser.markup(MarkupFactoryImpl.java:91)[na:na]
      2 frames
    3. com.atlassian.stash
      DefaultMarkupService$2.apply
      1. com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:78)[stash-service-impl-2.9.2.jar:na]
      2. com.atlassian.stash.internal.markup.DefaultMarkupService$2.apply(DefaultMarkupService.java:75)[stash-service-impl-2.9.2.jar:na]
      2 frames
    4. com.atlassian.markup
      MarkupRendererImpl.render
      1. com.atlassian.markup.renderer.impl.MarkupRendererImpl.render(MarkupRendererImpl.java:42)[atlassian-markup-renderer-0.2.3.jar:na]
      1 frame
    5. com.atlassian.stash
      AbstractResourceFilterFactory$ResourceFilterEx.filter
      1. com.atlassian.stash.internal.markup.DefaultMarkupService.render(DefaultMarkupService.java:58)[stash-service-impl-2.9.2.jar:na]
      2. com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.render(DefaultMarkupEnricher.java:42)[stash-rest-common-2.9.2.jar:na]
      3. com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.access$000(DefaultMarkupEnricher.java:14)[stash-rest-common-2.9.2.jar:na]
      4. com.atlassian.stash.rest.enrich.DefaultMarkupEnricher$1.apply(DefaultMarkupEnricher.java:31)[stash-rest-common-2.9.2.jar:na]
      5. com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:193)[stash-rest-common-2.9.2.jar:na]
      6. com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206)[stash-rest-common-2.9.2.jar:na]
      7. com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206)[stash-rest-common-2.9.2.jar:na]
      8. com.atlassian.stash.rest.util.RestUtils.processEntities(RestUtils.java:206)[stash-rest-common-2.9.2.jar:na]
      9. com.atlassian.stash.rest.enrich.DefaultMarkupEnricher.enrich(DefaultMarkupEnricher.java:26)[stash-rest-common-2.9.2.jar:na]
      10. com.atlassian.stash.internal.rest.filter.MarkupResourceFilterFactory$1.filter(MarkupResourceFilterFactory.java:23)[stash-rest-2.9.2.jar:na]
      11. com.atlassian.stash.rest.util.AbstractResourceFilterFactory$ResourceFilterEx.filter(AbstractResourceFilterFactory.java:49)[stash-rest-common-2.9.2.jar:na]
      11 frames
    6. com.atlassian.applinks
      ContextFilter.doFilter
      1. com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25)[applinks-plugin-4.0.5_1384118240000.jar:na]
      1 frame
    7. com.atlassian.stash
      BeforeLoginPluginAuthenticationFilter.doFilter
      1. com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:90)[StashAuthenticationFilter.class:na]
      2. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111)[BeforeLoginPluginAuthenticationFilter.class:na]
      3. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77)[BeforeLoginPluginAuthenticationFilter.class:na]
      3 frames
    8. com.atlassian.security
      TrustedApplicationsFilter.doFilter
      1. com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100)[atlassian-trusted-apps-core-3.0.2.jar:na]
      1 frame
    9. com.atlassian.oauth
      OAuthFilter.doFilter
      1. com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:61)[atlassian-oauth-service-provider-plugin-1.9.0-m3_1384118242000.jar:na]
      1 frame
    10. com.atlassian.stash
      DefaultRequestManager.doAsRequest
      1. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89)[BeforeLoginPluginAuthenticationFilter.class:na]
      2. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)[BeforeLoginPluginAuthenticationFilter.class:na]
      3. com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:72)[stash-service-impl-2.9.2.jar:na]
      3 frames
    11. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[na:1.6.0_20]
      2. java.lang.Thread.run(Thread.java:636)[na:1.6.0_20]
      2 frames