[ 
https://issues.apache.org/jira/browse/NIFI-7691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167824#comment-17167824
 ] 

Karthikeyan Singaravelan commented on NIFI-7691:
------------------------------------------------

GitHub PR : https://github.com/apache/nifi/pull/4443

> Nifi web api crashes due to empty payload causing NullPointerException
> ----------------------------------------------------------------------
>
>                 Key: NIFI-7691
>                 URL: https://issues.apache.org/jira/browse/NIFI-7691
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Flow Versioning
>    Affects Versions: 1.11.4
>            Reporter: Karthikeyan Singaravelan
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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.
>  
> {code:java}
> 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
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to