[wp-trac] [WordPress Trac] #28625: Enhancement: Add constants to support SSL connections for mysqli
WordPress Trac
noreply at wordpress.org
Tue Feb 2 18:25:52 UTC 2021
#28625: Enhancement: Add constants to support SSL connections for mysqli
----------------------------------------+-----------------------------
Reporter: hypertextranch | Owner: (none)
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Database | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses: privacy
----------------------------------------+-----------------------------
Comment (by pbiron):
Note, I discovered over the weekend that, in at least some cases, WP 5.6
is capable of opening a secure connection to MySQL without any mods (or
need for something like the Secure DB Connection plugin).
Don't know whether that is a result of changes in core/MySQL/PHP since
this ticket was opened (until a few days ago I didn't know that encrypted
connections to MySQL where possible :-)
I've tested in the follow 2 environments, and all I had to do was add
`define( 'MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL )`
to `wp-config.php` to get an encrypted connection.
Windows
WP 5.6
PHP 7.4.13
MySQL 5.7.10
Apache 2.4.37
CentOS 7
WP 5.6
PHP 7.4.14
MySQL 5.7.33
Apache 2.4.6 (altho I believe this includes many patches after
that offial version num)
That doesn't mean that this ticket can be closed however. I guess there
are setups that would require specifying other than default certs, which
the patch allows to happen.
p.s. threw together a little plugin that displays whether the connection
is secure:
* At a Glance (and Network Right Now) dashboard widget (like Secure DB
Connection does)
* an admin bar node
* a Site Health test and debug_info (the text of those need more work)
You can grab it from it from [https://github.com/pbiron/db-crossing-
guard/releases/download/0.21/db-crossing-guard.0.2.1.zip GitHub]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28625#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list