diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-10-20 20:36:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-10-20 20:36:59 +0000 |
commit | 8ac958c876d2894fc6d11628fa7f33242faa10c9 (patch) | |
tree | 6fe404bfb086cdbe6e2dd93c0829ca0861843dc7 /ansible-adapter | |
parent | ffd3dd43f55c91c99decf53d20d48aab4345580d (diff) | |
parent | 7e33b0ae33ba2c994daae949450386ca30ea7793 (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.java | 6 |
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 6295a2557..672e0df67 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); |