Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.11.4
-
None
Description
There is a crash in the nifi web api on posting empty payload via curl to versions/active-requests endpoint. It seems the request is not validated to be null and causes NullPointerException.
There should be a null check to throw exception stating request should not be empty before getting group ID at https://github.com/apache/nifi/blob/4d940bb151eb8d250b0319318b96d23c4a9819ae/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/VersionsResource.java#L263 .
I would like to contribute a patch to nifi with the fix that I have already tested manually. I am a new contributor so any help on this will be appreciated.
Curl request :
$ curl -X POST http://localhost:8080/nifi-api/versions/active-requests An unexpected error has occurred. Please check the logs for additional details
Error log :
2020-07-28 12:26:50,706 ERROR [NiFi Web Server-27] o.a.nifi.web.api.config.ThrowableMapper An unexpected error has occurred: java.lang.NullPointerException. Returning Internal Server Error response.
java.lang.NullPointerException: null
at org.apache.nifi.web.api.VersionsResource.createVersionControlRequest(VersionsResource.java:263)
Attachments
Issue Links
- links to