You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Pierre Villard (Jira)" <ji...@apache.org> on 2020/07/28 19:15:00 UTC
[jira] [Updated] (NIFI-7682) Nifi web api crashes on empty payload
to versions/active-requests
[ https://issues.apache.org/jira/browse/NIFI-7682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pierre Villard updated NIFI-7682:
---------------------------------
Status: Patch Available (was: Open)
> Nifi web api crashes on empty payload to versions/active-requests
> -----------------------------------------------------------------
>
> Key: NIFI-7682
> URL: https://issues.apache.org/jira/browse/NIFI-7682
> Project: Apache NiFi
> Issue Type: Bug
> Components: Flow Versioning
> Affects Versions: 1.11.4
> Reporter: Karthikeyan Singaravelan
> Priority: Major
>
> 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 :*
> {code:java}
> $ curl -X POST http://localhost:8080/nifi-api/versions/active-requests
> An unexpected error has occurred. Please check the logs for additional details{code}
> *Error log :*
> {code:java}
> 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)
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)