Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-15669

NullPointerException in IdCachedServicesImpl if no QueryId is present

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 13.5.0, 13.5.1, 13.5.2, 14.0.0, 14.1.0, 14.1.1, 14.5.0, 14.5.1, 5.5.1, 14.1.1.1, 14.1.1.2, 14.1.1.3, 6.0.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4, 14.1.1.4, 6.0.0.5, 14.1.1.5, 14.1.2.2, 6.5.0, 6.0.0.6, 6.5.0.1, 6.0.0.7, 14.1.2.3, 6.5.1, 6.5.0.2, 14.1.2.4, 6.5.2, 6.5.2.1, 6.5.2.2, 14.1.2.5, 14.1.2.11
    • Fix Version/s: None
    • Component/s: other
    • Labels:
    • Environment:
      Oracle JDK 1.8.0_201
      Apache Tomcat/9.0.8
      AM 6.0.0.6
    • Support Ticket IDs:

      Description

      Bug description

      NullPointerException is happening when no QueryId is present

      How to reproduce the issue

      1. Perform a search with null value , e.g. AMIdentityRepository.searchIdentities(IdType.USER, null, idsc);
      Expected behaviour
      NullPointerException must not be thrown 
      
      Current behaviour
      NPE happens
      

      Code analysis

      com.sun.identity.idm.server.IdCachedServicesImpl.java
      ...
          @Override
          public IdSearchResults search(SSOToken token, IdType type, IdSearchControl ctrl, String orgName,
                                        CrestQuery crestQuery)
                  throws IdRepoException, SSOException {
      ...
              if (crestQuery.hasQueryId()) {
      
                  String pattern = crestQuery.getQueryId();
      
                  // in legacy mode we must do search in order
                  // to get the AMSDKDN component added to AMIdentity's uvid.
                  // otherwise unix and anonymous login will fail.
                  //
                  if ((pattern.indexOf('*') == -1)) {
      ...
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bthalmayr Bernhard Thalmayr
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: