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

Downloaded LFS files have incorrect name in 5.9.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 5.10.0, 5.9.1
    • 5.9.0
    • None
    • None

    Description

      When browsing LFS files in the Web UI, if the file is not an image that can be rendered, a download link is presented. When a file is downloaded via this link, in Bitbucket Server 5.9.0 the file name is just the LFS object id (the SHA256 hash), where it should be the real filename.

      The file name is actually set by having the browser sent a URL parameter "response-content-disposition", then the server in its response use this filename in its Content-Disposition header. As of 5.9.0 it appears the front end is double encoding the URL, and as a result breaking this functionality.

      Here is an example URL:

      https://bitbucket.example.com/rest/git-lfs/storage/~USERNAME/lfstest/78293b872e58736d462ddd040762955ad995be18e1ff2154345413a782d14110?response-content-disposition=attachment%253B%2520filename%253D%2522ben.bin%2522%253B%2520filename*%253Dutf-8%27%27ben.bin

      Attachments

        Activity

          People

            behumphreys Ben Humphreys
            behumphreys Ben Humphreys
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: