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

Blob store existence check is case sensitive

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.39.0, 3.40.0, 3.41.0, 3.40.1
    • Fix Version/s: None
    • Component/s: Blobstore, REST
    • Labels:
    • Notability:
      3

      Description

      When attempting to delete a repository created via the REST API, the following error can occur:

      org.sonatype.nexus.repository.storage.StorageFacetImpl - Failed transition: STOPPED -> DELETED
      java.lang.NullPointerException: null
          at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:880)
          at org.sonatype.nexus.repository.storage.internal.StorageFacetManagerImpl.enqueueDeletion(StorageFacetManagerImpl.java:85)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
          at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
          at org.sonatype.nexus.repository.storage.StorageFacetImpl.lambda$3(StorageFacetImpl.java:244)
          at org.sonatype.nexus.orient.transaction.OrientOperations.lambda$2(OrientOperations.java:62)
          at org.sonatype.nexus.transaction.OperationPoint.lambda$0(OperationPoint.java:53)
          at org.sonatype.nexus.transaction.OperationPoint.proceed(OperationPoint.java:64)
          at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:58)
          at org.sonatype.nexus.transaction.Operations.proceedWithTransaction(Operations.java:232)
          at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:223)
          at org.sonatype.nexus.transaction.Operations.run(Operations.java:175)
          at org.sonatype.nexus.orient.transaction.OrientOperations.run(OrientOperations.java:62)
          at org.sonatype.nexus.repository.storage.StorageFacetImpl.doDelete(StorageFacetImpl.java:242)
          at org.sonatype.nexus.repository.FacetSupport.delete(FacetSupport.java:178)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
          at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
          at org.sonatype.nexus.repository.manager.internal.RepositoryImpl.delete(RepositoryImpl.java:273)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
          at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
          at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.deleteRepositoryFromMemory(RepositoryManagerImpl.java:425)
          at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.delete(RepositoryManagerImpl.java:401)
      

       This can happen if on repository creation (via the API), the blob store name set did not match the actual case of the given blob store's name. When the repository delete is then performed, the existence check of the blob store is case sensitive.

      Expected:

      As blob store creation is case insensitive, so should any checks that try to determine if the given blob store exists.

      To reproduce:

      1. Create a file based blob store with a mixed case name e.g. "Maven".
      2. Create a repository via the REST API and when setting the blob store name, pass in the value in lowercase e.g. "maven".
      3. Once the repository is created, attempt to delete it (via UI or API). 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              hardeepn Hardeep Nagra
              Last Updated By:
              Michael Oliverio Michael Oliverio
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  tigCommentSecurity.panel-title