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

Handle slash in documents name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.1
    • Fix Version/s: 5.8.0-HF34, 6.0-HF12, 7.3
    • Component/s: Core
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      Throw ClientException when document's name contains slash on create, move ot copy document.

      Show
      Throw ClientException when document's name contains slash on create, move ot copy document.
    • Sprint:
      Sprint io 7.3-3

      Description

      When using document name containing slash, the CoreSession breaks with different behaviour. In most cases, the CoreSession tries to move the document in the corresponding parent which does not exists:
      If the expected name is "one/two/three", the CoreSession tries to put the document in parentPath/one/two with name three.

      CoreSession.createDocumentModel("/", "test/toast", "Document") => The parent /test does not exists !

      We should eitheir escape the name by using the PathSegmentService.

      Or - at least - throw the same exception in:

      • org.nuxeo.ecm.core.api.CoreSession.createDocumentModel(String, String, String)
      • org.nuxeo.ecm.core.api.CoreSession.importDocuments(List<DocumentModel>)
      • org.nuxeo.ecm.core.api.CoreSession.copy(DocumentRef, DocumentRef, String)
      • org.nuxeo.ecm.core.api.CoreSession.move(DocumentRef, DocumentRef, String)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 minute
                1m

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.