You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by bb...@apache.org on 2023/01/23 20:51:32 UTC
[nifi] branch main updated: NIFI-11032: Addressing NPE when retrieving registry client info with unauthorized user (#6879)
This is an automated email from the ASF dual-hosted git repository.
bbende pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new bf871e0b8d NIFI-11032: Addressing NPE when retrieving registry client info with unauthorized user (#6879)
bf871e0b8d is described below
commit bf871e0b8decf6895c0522a4e25da5e623808656
Author: Joe Gresock <jg...@gmail.com>
AuthorDate: Mon Jan 23 15:51:25 2023 -0500
NIFI-11032: Addressing NPE when retrieving registry client info with unauthorized user (#6879)
---
.../src/main/java/org/apache/nifi/web/api/FlowResource.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
index b297192d3a..228924d0d8 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
@@ -1646,8 +1646,10 @@ public class FlowResource extends ApplicationResource {
private FlowRegistryClientEntity populateRemainingRegistryClientEntityContent(final FlowRegistryClientEntity flowRegistryClientEntity) {
flowRegistryClientEntity.setUri(generateResourceUri("controller", "registry-clients", flowRegistryClientEntity.getId()));
- if (flowRegistryClientEntity.getComponent().getType().equals(NIFI_REGISTRY_TYPE)) {
- flowRegistryClientEntity.getComponent().setUri(flowRegistryClientEntity.getComponent().getProperties().get("url"));
+ if (flowRegistryClientEntity.getComponent() != null) {
+ if (flowRegistryClientEntity.getComponent().getType().equals(NIFI_REGISTRY_TYPE)) {
+ flowRegistryClientEntity.getComponent().setUri(flowRegistryClientEntity.getComponent().getProperties().get("url"));
+ }
}
return flowRegistryClientEntity;