mirror of
https://github.com/apache/nifi.git
synced 2025-02-28 14:39:10 +00:00
NIFI-344 - Validating remote process group URI in the backend
This commit is contained in:
parent
dde5fd51a4
commit
09090825de
@ -371,6 +371,10 @@ public class RemoteProcessGroupResource extends ApplicationResource {
|
|||||||
throw new IllegalArgumentException("The specified remote process group URL is malformed: " + requestProcessGroupDTO.getTargetUri());
|
throw new IllegalArgumentException("The specified remote process group URL is malformed: " + requestProcessGroupDTO.getTargetUri());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(uri.getScheme().equalsIgnoreCase("http") || uri.getScheme().equalsIgnoreCase("https"))) {
|
||||||
|
throw new IllegalArgumentException("The specified remote process group URL is invalid, only http and https are supported: " + requestProcessGroupDTO.getTargetUri());
|
||||||
|
}
|
||||||
|
|
||||||
// normalize the uri to the other controller
|
// normalize the uri to the other controller
|
||||||
String controllerUri = uri.toString();
|
String controllerUri = uri.toString();
|
||||||
if (controllerUri.endsWith("/")) {
|
if (controllerUri.endsWith("/")) {
|
||||||
@ -861,6 +865,10 @@ public class RemoteProcessGroupResource extends ApplicationResource {
|
|||||||
throw new IllegalArgumentException("The specified remote process group URL is malformed: " + requestRemoteProcessGroup.getTargetUri());
|
throw new IllegalArgumentException("The specified remote process group URL is malformed: " + requestRemoteProcessGroup.getTargetUri());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(uri.getScheme().equalsIgnoreCase("http") || uri.getScheme().equalsIgnoreCase("https"))) {
|
||||||
|
throw new IllegalArgumentException("The specified remote process group URL is invalid, only http and https are supported: " + requestRemoteProcessGroup.getTargetUri());
|
||||||
|
}
|
||||||
|
|
||||||
// normalize the uri to the other controller
|
// normalize the uri to the other controller
|
||||||
String controllerUri = uri.toString();
|
String controllerUri = uri.toString();
|
||||||
if (controllerUri.endsWith("/")) {
|
if (controllerUri.endsWith("/")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user