mirror of
https://github.com/apache/nifi.git
synced 2025-02-28 06:29:25 +00:00
NIFI-344 - Validating remote process group URI in the backend
This commit is contained in:
parent
dde5fd51a4
commit
09090825de
@ -370,6 +370,10 @@ public class RemoteProcessGroupResource extends ApplicationResource {
|
||||
if (uri.getScheme() == null || uri.getHost() == null) {
|
||||
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
|
||||
String controllerUri = uri.toString();
|
||||
@ -860,6 +864,10 @@ public class RemoteProcessGroupResource extends ApplicationResource {
|
||||
if (uri.getScheme() == null || uri.getHost() == null) {
|
||||
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
|
||||
String controllerUri = uri.toString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user