From 008cce8d859f577b87220d2a9b3da6bdce75faa0 Mon Sep 17 00:00:00 2001 From: Rob Bast Date: Wed, 20 Jan 2016 21:24:13 +0100 Subject: [PATCH] add back sanity checks --- src/Composer/Util/RemoteFilesystem.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 48551be1b..610dcb32e 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -655,6 +655,14 @@ class RemoteFilesystem } } + if (isset($options['ssl']['cafile']) && (!is_readable($options['ssl']['cafile']) || !$this->validateCaFile($options['ssl']['cafile']))) { + throw new TransportException('The configured cafile was not valid or could not be read.'); + } + + if (isset($options['ssl']['capath']) && (!is_dir($options['ssl']['capath']) || !is_readable($options['ssl']['capath']))) { + throw new TransportException('The configured capath was not valid or could not be read.'); + } + /** * Disable TLS compression to prevent CRIME attacks where supported. */