-
Bug
-
Resolution: Fixed
-
Medium
-
5.9.7, 5.13.2
-
17
-
Severity 2 - Major
-
0
-
Summary
When certain records contain ASCII NUL ( X'00' ) the Bamboo XML export will fail with Invalid null character as soon as it hits that record.
This error is not always visible in the UI, sometimes Bamboo reports that the export was successful despite the error. A separate bug report exists for this: BAM-17957
The current columns where we've encountered this:
- VARIABLE_VALUE and VARIABLE_KEY in table VARIABLE_CONTEXT (offending data appears to be loaded via Inject variables)
- VARIABLE_VALUE and VARIABLE_KEY in table VARIABLE_DEFINITION (offending data appears to be loaded via Inject variables)
- FAILURE_REASON in table MERGE_RESULT
- CUSTOM_INFO_KEY and CUSTOM_INFO_VALUE in BUILDRESULTSUMMARY_CUSTOMDATA
- MSG in AUDIT_LOG
- KEY_IDENTIFIER and VALUE in CAPABILITY
- NEW_VALUE in AUDIT_LOG
We have also experienced this in the past with data in AUTH_ATTEMPT_INFO which was fixed in 5.10: BAM-15093 Exclude AUTH_ATTEMPT_INFO from Bamboo's backup
Environment
- MySQL, Microsoft SQL Server or Oracle as the database engine
Steps to Reproduce
- Spin up a fresh instance connected to MySQL
- Create a build plan
- Add an inject variable task > Load the attached test.prop in with result scope
- Build the plan
- Bamboo Admin > Export (with results)
Alternatively
- Spin up a fresh instance connected to MySQL
- Create a build plan
- Add a plan variable through the UI
- Build the plan
- Update the VARIABLE_VALUE in VARIABLE_DEFINITION to contain the ASCII NUL via SQL
- Bamboo Admin > Export
Note: Builds on PostgreSQL fail to inject the variable.
Expected Results
XML export would succeed, stripping the invalid null character
Actual Results
The resulting export zip is incomplete. projects.xml is truncated at point of failure.
The below exception is thrown in the atlassian-bamboo.log file:
2016-11-21 11:25:08,051 INFO [http-nio-8085-exec-4] [XmlMigrator] Writing xml to file: /var/bamboo-home-2/exports/test3.zip/db-export/projects.xml 2016-11-21 11:25:08,051 INFO [http-nio-8085-exec-4] [XmlMigrator] Exporting with: com.atlassian.bamboo.migration.stream.ProjectMapper 2016-11-21 11:25:08,057 INFO [http-nio-8085-exec-4] [AbstractProjectMapper] Exporting project [TEST] 2016-11-21 11:25:08,090 ERROR [http-nio-8085-exec-4] [AbstractResultSummaryMapper] Could not export com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl@9dae48b4 com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:473) at org.codehaus.staxmate.out.SMOutputContext.writeCharacters(SMOutputContext.java:479) at org.codehaus.staxmate.out.SMOutputContainer.addCharacters(SMOutputContainer.java:171) at com.atlassian.bamboo.migration.SMOutputElementAppender.append(SMOutputElementAppender.java:40) at com.atlassian.bamboo.migration.SMOutputElementAppender.appendIfNotBlank(SMOutputElementAppender.java:119) at com.atlassian.bamboo.migration.stream.VariableContextSnapshotMapper.exportProperties(VariableContextSnapshotMapper.java:59) at com.atlassian.bamboo.migration.stream.VariableContextSnapshotMapper.exportProperties(VariableContextSnapshotMapper.java:17) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:111) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:176) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:154) at com.atlassian.bamboo.migration.stream.AbstractResultSummaryMapper.exportProperties(AbstractResultSummaryMapper.java:208) at com.atlassian.bamboo.migration.stream.BuildResultSummaryMapper.exportProperties(BuildResultSummaryMapper.java:50) at com.atlassian.bamboo.migration.stream.BuildResultSummaryMapper.exportProperties(BuildResultSummaryMapper.java:22) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:111) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:94) at com.atlassian.bamboo.migration.stream.AbstractResultSummaryMapper.access$000(AbstractResultSummaryMapper.java:53) at com.atlassian.bamboo.migration.stream.AbstractResultSummaryMapper$2.accept(AbstractResultSummaryMapper.java:399) at com.atlassian.bamboo.migration.stream.AbstractResultSummaryMapper$2.accept(AbstractResultSummaryMapper.java:389) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao$38.nextScrollableResult(BuildResultsSummaryHibernateDao.java:1634) at com.atlassian.bamboo.hibernate.callbacks.ScrollHibernateCallback.doInHibernate(ScrollHibernateCallback.java:54) at com.atlassian.bamboo.hibernate.callbacks.ScrollHibernateCallback.doInHibernate(ScrollHibernateCallback.java:12) at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:341) at org.springframework.orm.hibernate4.HibernateTemplate.execute(HibernateTemplate.java:296) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryHibernateDao.scrollResultSummaries(BuildResultsSummaryHibernateDao.java:1600) at com.atlassian.bamboo.migration.stream.AbstractResultSummaryMapper.exportListXml(AbstractResultSummaryMapper.java:388) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:154) at com.atlassian.bamboo.migration.stream.JobMapper.exportProperties(JobMapper.java:98) at com.atlassian.bamboo.migration.stream.JobMapper.exportProperties(JobMapper.java:36) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:111) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:176) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:154) at com.atlassian.bamboo.migration.stream.ProjectMapper.exportProperties(ProjectMapper.java:97) at com.atlassian.bamboo.migration.stream.ProjectMapper.exportProperties(ProjectMapper.java:32) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.exportXml(BambooStAXMappingHelperAbstractImpl.java:111) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:176) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.exportListXml(BambooStAXMappingListHelperAbstractImpl.java:154) at com.atlassian.bamboo.migration.stream.AbstractProjectMapper.exportData(AbstractProjectMapper.java:162) at com.atlassian.bamboo.migration.XmlMigrator.exportToStream(XmlMigrator.java:557) at com.atlassian.bamboo.migration.XmlMigrator.exportXml(XmlMigrator.java:489) at com.atlassian.bamboo.migration.XmlMigrator$$FastClassBySpringCGLIB$$b6578fc7.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) at com.atlassian.bamboo.migration.XmlMigrator$$EnhancerBySpringCGLIB$$223bdcc5.exportXml(<generated>) at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooExport(ImportExportManagerImpl.java:99) at com.atlassian.bamboo.ww2.actions.admin.migration.Export.execute(Export.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:892) at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1537) at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68) at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethodWithDebugInfo(XWorkMethodAccessor.java:96) at com.opensymphony.xwork2.ognl.accessor.XWorkMethodAccessor.callMethod(XWorkMethodAccessor.java:88) at ognl.OgnlRuntime.callMethod(OgnlRuntime.java:1613) at ognl.ASTMethod.getValueBody(ASTMethod.java:91) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) at ognl.SimpleNode.getValue(SimpleNode.java:258) at ognl.Ognl.getValue(Ognl.java:494) at ognl.Ognl.getValue(Ognl.java:458) at com.opensymphony.xwork2.ognl.OgnlUtil$3.execute(OgnlUtil.java:351) at com.opensymphony.xwork2.ognl.OgnlUtil.compileAndExecuteMethod(OgnlUtil.java:403) at com.opensymphony.xwork2.ognl.OgnlUtil.callMethod(OgnlUtil.java:349) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:422) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:284) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:245) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:177) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.validateWorkflow(BambooWorkflowInterceptor.java:54) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.access$000(BambooWorkflowInterceptor.java:16) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:33) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor$1.call(BambooWorkflowInterceptor.java:29) at com.atlassian.bamboo.util.BambooProfilingUtils.withUtilTimerStack(BambooProfilingUtils.java:39) at com.atlassian.bamboo.ww2.interceptors.BambooWorkflowInterceptor.doIntercept(BambooWorkflowInterceptor.java:28) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:97) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:260) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.validate(BambooValidationInterceptor.java:50) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.access$000(BambooValidationInterceptor.java:12) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor$1.call(BambooValidationInterceptor.java:29) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor$1.call(BambooValidationInterceptor.java:25) at com.atlassian.bamboo.util.BambooProfilingUtils.withUtilTimerStack(BambooProfilingUtils.java:39) at com.atlassian.bamboo.ww2.interceptors.BambooValidationInterceptor.doIntercept(BambooValidationInterceptor.java:24) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:97) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.FieldErrorUsageVerifier.intercept(FieldErrorUsageVerifier.java:49) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.JSONValidationInterceptor.doIntercept(JSONValidationInterceptor.java:69) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.SimpleConversionErrorInterceptor.intercept(SimpleConversionErrorInterceptor.java:82) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.BambooXsrfTokenInterceptor.doIntercept(BambooXsrfTokenInterceptor.java:77) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.xwork.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:244) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:99) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:155) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:174) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:97) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:130) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.GlobalAdminInterceptor.doIntercept(GlobalAdminInterceptor.java:23) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptor.intercept(WebworkSecurityInterceptor.java:57) at com.atlassian.bamboo.security.acegi.intercept.web.WebworkSecurityInterceptorProxy.intercept(WebworkSecurityInterceptorProxy.java:31) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.xwork.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.OnDemandNotSupportedInterceptor.intercept(OnDemandNotSupportedInterceptor.java:31) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.PaginationAwareInterceptor.doIntercept(PaginationAwareInterceptor.java:100) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.StatisticsAwareInterceptor.doIntercept(StatisticsAwareInterceptor.java:39) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.ResultsListAwareInterceptor.doIntercept(ResultsListAwareInterceptor.java:42) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.NavigationAwareInterceptor.doIntercept(NavigationAwareInterceptor.java:112) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.BuildResultsSummaryAwareInteceptor.doIntercept(BuildResultsSummaryAwareInteceptor.java:71) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.ResultsSummaryAwareInteceptor.doIntercept(ResultsSummaryAwareInteceptor.java:74) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.ChainAwareInterceptor.doIntercept(ChainAwareInterceptor.java:111) at com.atlassian.bamboo.ww2.interceptors.AbstractBambooInterceptor.intercept(AbstractBambooInterceptor.java:34) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.ConditionalActionInterceptor.intercept(ConditionalActionInterceptor.java:95) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:188) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.atlassian.bamboo.ww2.interceptors.AroundInterceptor.intercept(AroundInterceptor.java:25) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:193) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:240) at org.apache.struts2.factory.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:558) at org.apache.struts2.dispatcher.ExecuteOperations.executeAction(ExecuteOperations.java:81) at org.apache.struts2.dispatcher.filter.StrutsExecuteFilter.doFilter(StrutsExecuteFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter.doFilter(PrettyUrlsSiteMeshFixupFilter.java:32) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:55) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:79) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:51) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.SessionCreationForAnonymousUserFilter.doFilter(SessionCreationForAnonymousUserFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.NewRelicTransactionNamingFilter.doFilter(NewRelicTransactionNamingFilter.java:32) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.ww2.StrutsPrepareFilter$1.doFilter(StrutsPrepareFilter.java:81) at org.apache.struts2.dispatcher.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:94) at com.atlassian.bamboo.ww2.StrutsPrepareFilter.handleRequest(StrutsPrepareFilter.java:52) at com.atlassian.bamboo.ww2.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:40) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.BambooProfilingFilter.doFilter(BambooProfilingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:56) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.AccessLogFilter.doFilter(AccessLogFilter.java:93) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at com.atlassian.bamboo.filter.SeraphLoginFilter$1.run(SeraphLoginFilter.java:69) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runAs(ImpersonationHelper.java:67) at com.atlassian.bamboo.filter.SeraphLoginFilter.doFilter(SeraphLoginFilter.java:75) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at com.atlassian.bamboo.filter.BambooAcegiProxyFilter.doFilter(BambooAcegiProxyFilter.java:26) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.LicenseFilter.doFilter(LicenseFilter.java:81) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:240) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:148) at com.atlassian.seraph.filter.BambooLoginFilter.doFilter(BambooLoginFilter.java:34) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:103) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:56) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) at com.atlassian.bamboo.persistence.BambooSessionInViewFilter.doFilterInternal(BambooSessionInViewFilter.java:28) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.github.ziplet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:304) at com.atlassian.bamboo.filter.BambooCompressingFilter.doFilter(BambooCompressingFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.RequestCacheThreadLocalFilter.doFilter(RequestCacheThreadLocalFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.ClickjackingPreventionFilter.doFilter(ClickjackingPreventionFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.bamboo.filter.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:39) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:38) at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:58) at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:56) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:64) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:37) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:70) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:206) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: Invalid null character in text to output at com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:51) at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:623) at com.ctc.wstx.sw.RestrictedCharsAwareBufferingXmlWriter.writeCharacters(RestrictedCharsAwareBufferingXmlWriter.java:496) at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:471) ... 335 more
Notes
Affected data can be identified on MySQL with queries such as:
select * from VARIABLE_DEFINITION where VARIABLE_VALUE like '%\0%'; select * from VARIABLE_DEFINITION where VARIABLE_KEY like '%\0%'; select * from VARIABLE_CONTEXT where VARIABLE_VALUE like '%\0%'; select * from VARIABLE_CONTEXT where VARIABLE_KEY like '%\0%'; select * from MERGE_RESULT where FAILURE_REASON like '%\0%'; select * from BUILDRESULTSUMMARY_CUSTOMDATA where CUSTOM_INFO_KEY like '%\0%'; select * from BUILDRESULTSUMMARY_CUSTOMDATA where CUSTOM_INFO_VALUE like '%\0%'; select * from AUDIT_LOG where MSG like '%\0%'; select * from AUDIT_LOG where NEW_VALUE like '%\0%'; select * from CAPABILITY where KEY_IDENTIFIER like '%\0%'; select * from CAPABILITY where VALUE like '%\0%';
Microsoft SQL Server:
SELECT * FROM VARIABLE_DEFINITION WHERE CAST(VARIABLE_VALUE as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM VARIABLE_DEFINITION WHERE CAST(VARIABLE_KEY as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM VARIABLE_CONTEXT WHERE CAST(VARIABLE_VALUE as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM VARIABLE_CONTEXT WHERE CAST(VARIABLE_KEY as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM MERGE_RESULT WHERE CAST(FAILURE_REASON as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM BUILDRESULTSUMMARY_CUSTOMDATA WHERE CAST(CUSTOM_INFO_KEY as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM BUILDRESULTSUMMARY_CUSTOMDATA WHERE CAST(CUSTOM_INFO_VALUE as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM AUDIT_LOG WHERE CAST(MSG as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM AUDIT_LOG WHERE CAST(NEW_VALUE as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM CAPABILITY WHERE CAST(KEY_IDENTIFIER as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%'; SELECT * FROM CAPABILITY WHERE CAST(VALUE as varchar(max)) COLLATE SQL_Latin1_General_CP1_CI_AS like '%' + CHAR(0) + '%';
Oracle:
select * from VARIABLE_DEFINITION where VARIABLE_VALUE like '%' ||chr(0)|| '%'; select * from VARIABLE_DEFINITION where VARIABLE_KEY like '%' ||chr(0)|| '%'; select * from VARIABLE_CONTEXT where VARIABLE_VALUE like '%' ||chr(0)|| '%'; select * from VARIABLE_CONTEXT where VARIABLE_KEY like '%' ||chr(0)|| '%'; select * from MERGE_RESULT where FAILURE_REASON like '%' ||chr(0)|| '%'; select * from BUILDRESULTSUMMARY_CUSTOMDATA where CUSTOM_INFO_KEY like '%' ||chr(0)|| '%'; select * from BUILDRESULTSUMMARY_CUSTOMDATA where CUSTOM_INFO_VALUE like '%' ||chr(0)|| '%'; select * from AUDIT_LOG where MSG like '%' ||chr(0)|| '%'; select * from AUDIT_LOG where NEW_VALUE like '%' ||chr(0)|| '%'; select * from CAPABILITY where KEY_IDENTIFIER like '%' ||chr(0)|| '%'; select * from CAPABILITY where VALUE like '%' ||chr(0)|| '%';