Skip to content

Commit

Permalink
Fix too greedy disable of the MySQL server cert verification
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
lippserd committed Jul 20, 2021
1 parent 2e1ec53 commit d0da92b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Adapter/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d0da92b

Please sign in to comment.