Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-23616

Blob Store API allows users to create a blobstore without path

    XMLWordPrintable

    Details

      Description

      Below curl creates a new blobstore with empty "path" value:

      curl -v -u admin:admin123 -X POST "http://localhost:8081/service/rest/beta/blobstores/file" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"path\": \"\", \"name\": \"empty-path\"}"
      

      The created blobstore actually uses /opt/sonatype/sonatype-work/nexus3/blobs

      [root@node-nxrm-ha1 tasks]# cd /opt/sonatype/sonatype-work/nexus3/blobs
      [root@node-nxrm-ha1 blobs]# ls -l
      total 20
      -rw-r--r-- 1 sonatype sonatype 4096 Apr 22 05:19 A7E82A55-59F56FBC-A3B13A82-C8061BB2-DA17CF38-deletions.index
      -rw-r--r-- 1 sonatype sonatype   85 Apr 22 05:19 A7E82A55-59F56FBC-A3B13A82-C8061BB2-DA17CF38-metrics.properties
      drwxr-xr-x 5 sonatype sonatype 4096 Apr 22 05:17 content
      drwxr-xr-x 3 sonatype sonatype 4096 Apr 22 05:18 default
      -rw-r--r-- 1 sonatype sonatype   72 Apr 22 05:19 metadata.properties
      

      Expected result:
      Should not accept empty string.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mlukaretkyi Maksym Lukaretkyi
              Reporter:
              hosako Hajime Osako
              Last Updated By:
              Michael Prescott Michael Prescott
              Team:
              NXRM - Trinity
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title