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

Rendering issues when attaching images with spaces and other characters in PR's

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.9.0
    • 4.8.0
    • None

      Attaching an image with a title like Screenshot 2016-06-22 12.19.39.png (default OS X name for screenshots) in the PR description field will render it broken.

      See attached video.

      Env:
      https://stash.atlassian.com/projects/DV/repos/dt-fileviewer/pull-requests/174/overview
      Footer: Generated by stash-app-1.internal.atlassian.com (d7cfdead-083a-4e55-9b8b-f9fc10275c78). Cluster contains 2 nodes.

            [BSERV-8882] Rendering issues when attaching images with spaces and other characters in PR's

            Kristy added a comment -

            I have opened a related issue to this, where attachments names that contain HTTP Header illegal characters (e.g. a comma) cause errors.

            https://jira.atlassian.com/browse/BSERV-9694

            Kristy added a comment - I have opened a related issue to this, where attachments names that contain HTTP Header illegal characters (e.g. a comma) cause errors. https://jira.atlassian.com/browse/BSERV-9694

            I do not believe this issue has been fully resolved. I am also seeing this issue in 4.14.2 and 4.14.3 but with commas in the file path. This appears to be a general url safe sanitization of the path. If you use the inspector you will notice a javascript error on these pages. The inspector shows a console error with 'Failed to load resource: net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION'

            Derek Tamsen added a comment - I do not believe this issue has been fully resolved. I am also seeing this issue in 4.14.2 and 4.14.3 but with commas in the file path. This appears to be a general url safe sanitization of the path. If you use the inspector you will notice a javascript error on these pages. The inspector shows a console error with 'Failed to load resource: net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION'

            Kristy added a comment -

            Since the fix for this attachment issue is slightly different to the issue where users cannot 'blame' a file with spaces or view the context lines on file with spaces, I have created a new issue, BSERV-9040, to track these scenarios.

            Kristy added a comment - Since the fix for this attachment issue is slightly different to the issue where users cannot 'blame' a file with spaces or view the context lines on file with spaces, I have created a new issue,  BSERV-9040 , to track these scenarios.

            Brent P added a comment -

            It turns out that we were (unknowingly) taking advantage of a a bug in Tomcat that was fixed in Tomcat 8.0.35. When we upgraded to a new Tomcat version, this bug appeared. Fixing this bug in Bitbucket Server will fix a few other "space in paths" problems, too.

            Given that we don't support customers running their own Tomcat versions (we don't ship a WAR file), I'm happy to have this bug fixed in a way that won't work on Tomcat versions < 8.0.35.

            Brent P added a comment - It turns out that we were (unknowingly) taking advantage of a a bug in Tomcat that was fixed in Tomcat 8.0.35. When we upgraded to a new Tomcat version, this bug appeared. Fixing this bug in Bitbucket Server will fix a few other "space in paths" problems, too. Given that we don't support customers running their own Tomcat versions (we don't ship a WAR file), I'm happy to have this bug fixed in a way that won't work on Tomcat versions < 8.0.35.

            Stil happening to me. This is currently my biggest papercut with Bitbucket Server.

            Robert Massaioli (Atlassian) added a comment - Stil happening to me. This is currently my biggest papercut with Bitbucket Server.

            Mathieu M-Gosselin added a comment - - edited

            Happens for us too on v4.8.1.

            Mathieu M-Gosselin added a comment - - edited Happens for us too on v4.8.1.

              khughes@atlassian.com Kristy
              iloire Ivan Loire (Inactive)
              Affected customers:
              3 This affects my team
              Watchers:
              15 Start watching this issue

                Created:
                Updated:
                Resolved: