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

java.lang.IndexOutOfBoundsException when package contains '@2' in its path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.14.16, 2.14.20
    • Fix Version/s: 2.14.21
    • Component/s: Repository
    • Labels:
    • Notability:
      2

      Description

      When uploading or requesting a package containing "@2" in its path, the request fails with the following exception:

      Caused by: java.lang.IndexOutOfBoundsException: No group 2
       at java.util.regex.Matcher.group(Matcher.java:538)
       at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStorePath(NexusTargetMappingAuthorizationFilter.java:82)
       at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.getResourceStoreRequest(NexusTargetMappingAuthorizationFilter.java:101)
       at org.sonatype.nexus.security.filter.authz.NexusTargetMappingAuthorizationFilter.isAccessAllowed(NexusTargetMappingAuthorizationFilter.java:159)
       at org.apache.shiro.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:162)
       at org.apache.shiro.web.filter.PathMatchingFilter.isFilterChainContinued(PathMatchingFilter.java:214)
       at org.apache.shiro.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:189)
       at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:131)
       ... 61 common frames omitted

       

      This can be reproduced by requesting an npm scoped package such as https://www.npmjs.com/package/@2gis/mapgl or for example, by uploading a file containing "@2" in its filename to a site repo.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mmartz Michael Martz
              Reporter:
              hardeepn Hardeep Nagra
              Last Updated By:
              Michael Prescott Michael Prescott
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title