fix: mysql tls not being negotiated with DB_USE_ECRYPTION=true

This commit is contained in:
Matthew Salazar
2026-06-17 13:00:22 +01:00
parent d15cf1e5a3
commit 9203c088de
2 changed files with 19 additions and 1 deletions
+17
View File
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
## [Unreleased]
### Added
* *Nothing*
### Changed
* *Nothing*
### Deprecated
* *Nothing*
### Removed
* *Nothing*
### Fixed
* [#2625](https://github.com/shlinkio/shlink/issues/2625) Fix MySQL connections failing with `[3159] Connections using insecure transport are prohibited` when `DB_USE_ENCRYPTION=true` against a server requiring TLS.
## [5.1.3] - 2026-06-16
### Added
* *Nothing*
+2 -1
View File
@@ -36,7 +36,8 @@ return (static function (): array {
'maria', 'mysql' => !$useEncryption
? []
: [
1014 => false, // PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT: Trust any certificate
Pdo\Mysql::ATTR_SSL_CA => '', // Require connections to be encrypted
Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT => false, // Allow any certificate
],
'postgres' => !$useEncryption
? []