• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 3.7.2, 4.1.0, 4.0.2
    • 3.2.3
    • REST
    • None

      Summary

      Adding a blank list of users to a group in Crowd results in an HTML 500 error, plus an unhelpful entry in the Crowd logs.

      Steps to Reproduce

      1. Send a REST API call to add users to a group, but pass an empty list of users
       /crowd/rest/usermanagement/1/group/user/direct?groupname=GROUP_NAME_HERE

      Expected Results

      An error will be returned that no users were provided

      Actual Results

      • The Crowd logs will show:
        2018-08-06 17:04:03,565 http-nio-8095-exec-70 ERROR [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: The validated object is null
         java.lang.NullPointerException: The validated object is null
         at org.apache.commons.lang3.Validate.notNull(Validate.java:225)
         at org.apache.commons.lang3.Validate.notNull(Validate.java:206)
         at com.atlassian.crowd.manager.application.AliasManagerImpl.findUsernameByAlias(AliasManagerImpl.java:38)
         at sun.reflect.GeneratedMethodAccessor539.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:498)
        
      • The access logs will show a 500 error:
        [06/Aug/2018:17:04:03 +0200] Go-http-client/1.1 123.456.789.20 123.456.789.123 POST POST /crowd/rest/usermanagement/1/group/user/direct?groupname=GROUP_NAME_HERE HTTP/1.1 2767 500 http-nio-8095-exec-70 -
        

              07f034cb6f52 Daniel Serkowski
              jbentrup Jason B
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: