Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2366

Uploaded file name with spaces breaks upload, download, rename and copy operations

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.2.0
    • 6.1.0
    • Business Central
    • None

    Description

      Description of problem:
      1. When creating an Uploaded file in Project Authoring perspective, it is possible to input name containing spaces (which is a valid one). However BaseUploadServlet probably doesn't escape URI-illegal characters in the file name when creating git path URI and so fails with java.net.URISyntaxException.

      2. The same problem occurs when downloading contents of Uploaded file asset with spaces in name. In this case java.net.URISyntaxException originates from FileDownloadServlet.

      The errors above have no visible UI response, exception stack trace is printed into server log.

      3. When renaming/copying Uploaded file and typing a new name with spaces, error dialog pops up with the following message:

      Unable to complete your request. The following exception occurred: java.lang.StringIndexOutOfBoundsException:String index out of range: -1.

      There are no further details in server.log.

      Version-Release number of selected component (if applicable):
      6.1.0.ER6

      How reproducible:
      -

      Steps to Reproduce:
      1. Create new Uploaded file in Project Authoring perspective.
      2. Use name containing a space, e.g. "My File".
      3. Select any existing file on local file system (not a .txt file).
      4. Hit Ok to submit upload dialog, check server log, check Other section in Project Explorer.

      5. Create Uploaded file without spaces in name, upload any file.
      6. Clone the repository, rename the file to "My File", commit and push changes.
      7. Open "My File" in Business Central.
      8. Hit Download, check server.log.

      9. Create Uploaded file without spaces in name, upload any file.
      10. Try to rename or copy the file using new name with a space.

      Actual results:

      • Steps 4. & 8. java.net.URISyntaxException in server log.
      • Step 10. Error dialog with java.lang.StringIndexOutOfBoundsException:String index out of range: -1.

      Expected results:
      Business Central should be able to handle Uploaded file assets with spaces in name when uploading, downloading renaming or copying.

      Additional info:

      Attachments

        Activity

          People

            wmedvede@redhat.com Walter Medvedeo
            jlocker Jiří Locker
            Archiver:
            rhn-support-ceverson Clark Everson
            Jozef Marko Jozef Marko
            Jozef Marko Jozef Marko
            Jozef Marko, Kris Verlaenen, Walter Medvedeo

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty