Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-7691

Nifi web api crashes due to empty payload causing NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.11.4
    • 1.12.0
    • Flow Versioning
    • None

    Description

      Following endpoints that accept POST and PUT payload don't validate the request object to be null and throw NullPointerException on empty payloads. Endpoints and source code line as below. I will add a patch to check for null in these endpoints.

       

      curl -X POST http://localhost:8080/nifi-api/versions/process-groups/123
      - VersionsResource.java:472
      
      curl -X POST http://localhost:8080/nifi-api/versions/revert-requests/process-groups/123
      - VersionsResource.java:1072
      
      curl -X POST http://localhost:8080/nifi-api/versions/update-requests/process-groups/123
      - VersionsResource.java:1008
      
      curl -X PUT http://localhost:8080/nifi-api/flow/process-groups/1123
      - FlowResource.java:638
      
      curl -X PUT http://localhost:8080/nifi-api/flow/process-groups/123/controller-services
      - FlowResource.java:825
      
      curl -X POST http://localhost:8080/nifi-api/parameter-contexts/1/update-requests
      - ParameterContextResource.java:332
      
      curl -X POST http://localhost:8080/nifi-api/parameter-contexts/1/validation-requests
      - ParameterContextResource.java:622
      
      curl -X POST http://localhost:8080/nifi-api/process-groups/123/templates
      - ProcessGroupResource.java:3534
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xtreak Karthikeyan Singaravelan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m