Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-28629

NPE in API when group Anyone has global permissions

    XMLWordPrintable

Details

    Description

      A NullPointerException is thrown when trying to use the following code:

      globalPermissionManager.getGroupsWithPermission(globalPermissionId);
      
      java.lang.NullPointerException
              at com.atlassian.crowd.embedded.impl.IdentifierUtils.toLowerCase(IdentifierUtils.java:42)
              at com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.isGroupToBeFiltered(FilteredCrowdServiceImpl.java:340)
              at com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.getGroup(FilteredCrowdServiceImpl.java:73)
              at com.atlassian.jira.security.DefaultGlobalPermissionManager.getGroupsWithPermission(DefaultGlobalPermissionManager.java:260)
      

      The problem is that we have a global permission (Browse Users) assigned to group Anyone, but I can confirm that this happens for any other global permission and that removing the permission for group Anyone resolves this.
      This happens because group Anyone has a null name.
      IdentifierUtils contains:

      public static String toLowerCase(String identifier)
      {
              return identifier.toLowerCase(IDENTIFIER_COMPARE_LOCALE); // identifier is null here
      }
      

      Attachments

        Activity

          People

            mlassau Mark Lassau (Inactive)
            2ab2c0c69c28 FlorinM
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: