Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-11925

Lack of URL Encoding while downloading files truncates file names when they contain spaces

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.14.0, 7.14.0-alpha1
    • 7.12.5
    • rest-distro
    • Windows 10 x64
      Tomcat Application Server

      Steps to reproduce

      • Create a file locally with a filename that includes spaces, e. g. Foo Bar.txt
      • Use Firefox
      • Store the file as a process variable
      • Download the file e.g., via GET /variable-instance/[VARIABLE_INSTANCE_ID]/data and store it on your local machine

      Expected behavior

      When you check your download folder, the file should be stored as Foo Bar.txt

      Observed behavior

      The file is stored as Foo

      Problem

      The content-disposition header looks as follows:

      Content-Disposition: attachment; filename=Foo Bar.bpmn
      

      Solution

      The filename in the content-disposition header should be a double-quoted string:

      Content-Disposition: attachment; filename="Foo Bar.bpmn"
      

      Hints

      • The problem does not occur in Google Chrome
      • [1] states that the filename needs to be a double-quoted string

      [1] https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1

        This is the controller panel for Smart Panels app

            [CAM-11925] Lack of URL Encoding while downloading files truncates file names when they contain spaces

            I'd be happy to send a fix, I have forked the code and send a pull request when done.

            Juan C Calderon added a comment - I'd be happy to send a fix, I have forked the code and send a pull request when done.

            Hi johncc,

            thanks for your contribution.

            I'll have a look and provide you with review hints – next week at the latest.

            Stay tuned!

            Best,
            Tassilo

            Tassilo Weidner added a comment - Hi johncc , thanks for your contribution. I'll have a look and provide you with review hints – next week at the latest. Stay tuned! Best, Tassilo

            johncc, let's continue our conversation on GitHub.

            Tassilo Weidner added a comment - johncc , let's continue our conversation on GitHub.

              tassilo.weidner Tassilo Weidner
              johncc Juan C Calderon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: