Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-8160

Unable to View Source for Paths Containing Semicolons (;)

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Low Low
    • None
    • 4.0.2, 4.1.0
    • None
    • None

      Summary

      In Bitbucket Server, if a path to a file contains a semicolon, when viewing it in the UI, the source will fail to be rendered with the following error:

      The path "XXXX" does not exist at revision "XXXXX"
      

      Steps to Reproduce

      1. Perform a commit to your repository with a path containing a semicolon.
      2. Push your changes to Bitbucket Server.
      3. View the path in the Bitbucket Server UI.

      Expected Results

      The source and diff are rendered correctly.

      Actual Results

      The below exception is thrown in the atlassian-bitbucket.log file:

      DEBUG [http-nio-7990-exec-2] dlahn @N3YWLGx614x107x1 1ldnc7j 192.168.56.1,0:0:0:0:0:0:0:1 "GET /projects/PROJ/repos/test_repository/browse/test.pkb;plb HTTP/1.1" c.a.s.i.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 404
      com.atlassian.bitbucket.content.NoSuchPathException: The path "XXXX" does not exist at revision "XXXXX"
      	at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateStdErr(GitCommandExitHandler.java:74) ~[na:na]
      	at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:156) ~[na:na]
      	at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31) ~[bitbucket-spi-4.0.2.jar:na]
      	at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:138) ~[bitbucket-spi-4.0.2.jar:na]
      	at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:251) ~[bitbucket-spi-4.0.2.jar:na]
      	at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:220) ~[bitbucket-spi-4.0.2.jar:na]
      	at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:75) ~[bitbucket-spi-4.0.2.jar:na]
      	at com.atlassian.stash.internal.content.DefaultContentService.getType(DefaultContentService.java:70) ~[bitbucket-service-impl-4.0.2.jar:na]
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:30) ~[atlassian-plugins-core-4.0.4.jar:na]
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) ~[na:na]
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) ~[na:na]
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) ~[na:na]
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) ~[na:na]
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) ~[na:na]
      	at com.atlassian.stash.internal.rest.content.ContentResource.getContent(ContentResource.java:95) ~[bitbucket-rest-4.0.2.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.1_1443754990000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.1_1443754990000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.1_1443754990000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.1_1443754990000.jar:na]
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:26) [applinks-plugin-5.0.1_1443754990000.jar:na]
      	at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:88) [StashAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:109) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) [atlassian-trusted-apps-core-4.2.0.jar:na]
      	at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) [atlassian-oauth-service-provider-plugin-2.0.3_1443754990000.jar:na]
      	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) [atlassian-trusted-apps-core-4.2.0.jar:na]
      	at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) [atlassian-oauth-service-provider-plugin-2.0.3_1443754990000.jar:na]
      	at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:36) [analytics-client-4.2.6_1443758264000.jar:na]
      	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) [analytics-client-4.2.6_1443758264000.jar:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:87) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) [BeforeLoginPluginAuthenticationFilter.class:na]
      	at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:85) ~[bitbucket-service-impl-4.0.2.jar:na]
      	at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) ~[ConfigurableWebFilter.class:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_60]
      	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_60]
      	... 313 frames trimmed
      

      Notes

      Anything after the ; in the path is truncated. Therefore, if your filename is test.pkb;plb for example, Bitbucket Server will run a git call for test.pkb.

      Workaround

      There is no known workaround at this time, with the exception of not using semicolons in filenames.

            [BSERV-8160] Unable to View Source for Paths Containing Semicolons (;)

            Thanks, that worked!

            Peter Leibiger added a comment - Thanks, that worked!

            pleibiger, I've adjusted the regular expression for this issue. The regular expressions refresh on a daily basis, so these false positives should be fixed for you after tomorrow.

            Jeff Thomas added a comment - pleibiger , I've adjusted the regular expression for this issue. The regular expressions refresh on a daily basis, so these false positives should be fixed for you after tomorrow.

            This is actually a false positive of the log file scanner, I am getting daily mails from the scanner because there is no Jenkinsfile in some of the repositories/branches when Jenkins scans the repositories for a Jenkinsfile. Every com.atlassian.bitbucket.content.NoSuchPathException triggers the the log file scanner and links to this issue. 

            com.atlassian.bitbucket.content.NoSuchPathException: The path "Jenkinsfile" does not exist at revision "79682f9ad77e203937e8d8d0c06cb77789dd9203" 
             at com.atlassian.stash.internal.scm.git.command.lstree.TypeLsTreeOutputHandler.getOutput(TypeLsTreeOutputHandler.java:44) 
             at com.atlassian.stash.internal.scm.git.command.lstree.TypeLsTreeOutputHandler.getOutput(TypeLsTreeOutputHandler.java:18) 
             at com.atlassian.stash.internal.scm.git.command.GenericGitCommand.getResult(GenericGitCommand.java:27) 
             at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:289) 
             at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:251) 
             at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:87) 
             at com.atlassian.stash.internal.content.DefaultContentService.getType(DefaultContentService.java:162) 
             at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) 
             at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) 
             at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) 
             at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) 
             at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) 
             at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) 
             at com.atlassian.stash.internal.rest.content.ContentResource.getContent(ContentResource.java:145) 
             at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) 
             at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) 
             at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) 
             at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) 
             at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) 
             at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:92) 
             at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39) 
             at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) 
             at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81) 
             at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) 
             at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.onSuccess(StashAuthenticationFilter.java:219) 
             at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:100) 
             at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112) 
             at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) 
             at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) 
             at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) 
             at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) 
             at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69) 
             at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109) 
             at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32) 
             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.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) 
             at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90) 
             at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) 
             at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:89) 
             at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) 
             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
             at java.lang.Thread.run(Thread.java:748) 
             ... 295 frames trimmed
            

            Please fix the regular expression for the scanner!!

            Peter Leibiger added a comment - This is actually a false positive of the log file scanner, I am getting daily mails from the scanner because there is no Jenkinsfile in some of the repositories/branches when Jenkins scans the repositories for a Jenkinsfile . Every com.atlassian.bitbucket.content.NoSuchPathException triggers the the log file scanner and links to this issue.  com.atlassian.bitbucket.content.NoSuchPathException: The path "Jenkinsfile" does not exist at revision "79682f9ad77e203937e8d8d0c06cb77789dd9203" at com.atlassian.stash.internal.scm.git.command.lstree.TypeLsTreeOutputHandler.getOutput(TypeLsTreeOutputHandler.java:44) at com.atlassian.stash.internal.scm.git.command.lstree.TypeLsTreeOutputHandler.getOutput(TypeLsTreeOutputHandler.java:18) at com.atlassian.stash.internal.scm.git.command.GenericGitCommand.getResult(GenericGitCommand.java:27) at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:289) at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:251) at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:87) at com.atlassian.stash.internal.content.DefaultContentService.getType(DefaultContentService.java:162) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at com.atlassian.stash.internal. rest .content.ContentResource.getContent(ContentResource.java:145) at com.atlassian.applinks.core. rest .context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core. rest .context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core. rest .context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core. rest .context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core. rest .context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:92) at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:39) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.onSuccess(StashAuthenticationFilter.java:219) at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:100) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69) at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109) at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32) 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.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:89) at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.lang. Thread .run( Thread .java:748) ... 295 frames trimmed Please fix the regular expression for the scanner!!

            Still getting this daily on 5.8.0

            Peter Leibiger added a comment - Still getting this daily on 5.8.0

            Just got this reported yesterday on 5.5.0 in the error log.

            Peter Leibiger added a comment - Just got this reported yesterday on 5.5.0 in the error log.

            Frank Doherty added a comment - - edited

            We have tested this scenario in recent versions and are unable to reproduce (it is working as expected).

            Since the issue was originally reported some time ago it is most likely that it was fixed as part of other changes during the interim.

            Closing this ticket, but if it occurs again feel free to let us know and we can look at reopening it.

            Frank Doherty added a comment - - edited We have tested this scenario in recent versions and are unable to reproduce (it is working as expected). Since the issue was originally reported some time ago it is most likely that it was fixed as part of other changes during the interim. Closing this ticket, but if it occurs again feel free to let us know and we can look at reopening it.

            Nick added a comment -

            Can not reproduce this issue even with the test repo: https://stash.stg.internal.atlassian.com/projects/NICKS/repos/test_semicolons/browse/test.pkb;plb

            dlahn - in the instance you have, is viewing the source of a file enough to reproduce this ?

            Nick added a comment - Can not reproduce this issue even with the test repo: https://stash.stg.internal.atlassian.com/projects/NICKS/repos/test_semicolons/browse/test.pkb;plb dlahn - in the instance you have, is viewing the source of a file enough to reproduce this ?

              Unassigned Unassigned
              dlahn David Lahn (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: