From d0da92ba090d781bea42a82615020d7c4e1c804e Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 19 Jul 2021 13:59:44 +0200 Subject: [PATCH] Fix too greedy disable of the MySQL server cert verification Before, it was sufficient to set ssl_do_not_verify_server_cert to any value. Now it is necessary to set a value that is not considered empty(). --- src/Adapter/Mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Adapter/Mysql.php b/src/Adapter/Mysql.php index ff34470..b9a18c5 100644 --- a/src/Adapter/Mysql.php +++ b/src/Adapter/Mysql.php @@ -46,7 +46,7 @@ public function getOptions(Config $config) if ( defined('PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT') - && isset($config->ssl_do_not_verify_server_cert) + && ! empty($config->ssl_do_not_verify_server_cert) ) { $options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = false; }