Commit 94ad95c
Support the
`wp db import` (and other commands that build their MySQL invocation via
`DB_Command::get_mysql_args()`, such as `wp db query`) run the associative
arguments through an allow-list of valid MySQL client options. That list
already contained `ssl-mode` and every `ssl-*` certificate option, but was
missing the plain on/off toggles `ssl` and `skip-ssl`.
As a result, `wp db import --ssl` silently dropped the flag and connected
without SSL, while `wp db cli --ssl` worked because it passes the arguments
straight through. This produced confusing failures such as
"Error: Failed to get current SQL modes. Reason: ERROR 1045 (28000):
Access denied" against servers that require SSL.
Add `ssl` and `skip-ssl` to the allow-list so both are forwarded to the
MySQL/MariaDB client, matching `wp db cli` behaviour. A Behat scenario
asserts the flag now appears in the final MySQL command.
Fixes #218.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>--ssl and --skip-ssl flags in wp db import
1 parent 8b83c5a commit 94ad95c
2 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
111 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2231 | 2231 | | |
2232 | 2232 | | |
2233 | 2233 | | |
| 2234 | + | |
2234 | 2235 | | |
| 2236 | + | |
2235 | 2237 | | |
2236 | 2238 | | |
2237 | 2239 | | |
| |||
0 commit comments