Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32335

Fix blob download when the filename is "data"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2023.0
    • Fix Version/s: 2023.x
    • Component/s: Core IO

      Description

      Steps to reproduce:

      1. create a File document and attach a file named "data" (just "data" without any extension)
      2. after the file upload, observe that the preview is not correctly displayed
      3. now click on the download button
      4. observe that it displays an error message "Sorry, the page you requested cannot be found"

      Expected behavior: the blob is correctly downloaded

      Root cause analysis: the bug is caused by the decoding of the URL in https://github.com/nuxeo/nuxeo/blob/2023/modules/core/nuxeo-core-io/src/main/java/org/nuxeo/ecm/core/io/download/DownloadBlobInfo.java#L66-L67 where "file:content/data" matches a known property and therefore the xpath and filename variables are not correctly set, and the download service cannot retrieve the blob, hence the error.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tmartins Thierry Martins
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: