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: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2023.0
    • Fix Version/s: 2023.14
    • Component/s: Core IO
    • Release Notes Summary:
      Nuxeo can resolve and download blobs whose filename collide with an XPath.
    • Backlog priority:
      600
    • Sprint:
      nxplatform #115
    • Story Points:
      5

      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

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: