aboutsummaryrefslogtreecommitdiffstats
path: root/ansible-adapter
diff options
context:
space:
mode:
authorKAPIL SINGAL <ks220y@att.com>2020-10-20 20:36:59 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-20 20:36:59 +0000
commit8ac958c876d2894fc6d11628fa7f33242faa10c9 (patch)
tree6fe404bfb086cdbe6e2dd93c0829ca0861843dc7 /ansible-adapter
parentffd3dd43f55c91c99decf53d20d48aab4345580d (diff)
parent7e33b0ae33ba2c994daae949450386ca30ea7793 (diff)
Merge changes I4a6cb477,I00d6a0c1
* changes: Support netbox-client outside OSGi container Address security issues
Diffstat (limited to 'ansible-adapter')
-rw-r--r--ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java
index 6295a255..672e0df6 100644
--- a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java
+++ b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/ConnectionBuilder.java
@@ -53,6 +53,8 @@ import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.onap.ccsdk.sli.adaptors.ansible.model.AnsibleResult;
import org.onap.ccsdk.sli.adaptors.ansible.model.AnsibleResultCodes;
+import org.onap.ccsdk.sli.core.utils.PathValidator;
+
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -104,6 +106,10 @@ public class ConnectionBuilder {
public ConnectionBuilder(String trustStoreFile, char[] trustStorePasswd) throws KeyStoreException, IOException,
KeyManagementException, NoSuchAlgorithmException, CertificateException {
+ if (!PathValidator.isValidFilePath(trustStoreFile)) {
+ throw new IOException("Invalid trust store file path");
+ }
+
/* Load the specified trustStore */
KeyStore keystore = KeyStore.getInstance("JKS");
FileInputStream readStream = new FileInputStream(trustStoreFile);