Skip to content

Skip server certificate verification for MariaDB test connections#338

Merged
schlessera merged 1 commit into
mainfrom
fix/mariadb-ssl-verify-skip
Jul 21, 2026
Merged

Skip server certificate verification for MariaDB test connections#338
schlessera merged 1 commit into
mainfrom
fix/mariadb-ssl-verify-skip

Conversation

@schlessera

@schlessera schlessera commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #297. That change passed --ssl-verify-server-cert to the MariaDB
client calls in the test harness to silence the passwordless-login warning. That
flag enables certificate verification though, which forces TLS server
certificate checks that fail against self-signed or untrusted certificates, and
on clients older than 11.4 where verification was off by default.

Approach

Switch the five call sites to --skip-ssl-verify-server-cert, which explicitly
disables verification for the local test database. It silences the same warning
without turning verification on, so it also works when the client would
otherwise reject the self-signed certificate. The database type auto-detection
added in #297 is kept.

Summary by CodeRabbit

  • Bug Fixes
    • Improved MariaDB database operations by using the appropriate SSL certificate verification setting.
    • Updated database creation, connection testing, deletion, and import/export workflows for more reliable MariaDB support.

Follow-up to #297. That change passed `--ssl-verify-server-cert` to silence the
MariaDB passwordless-login warning, but that enables certificate verification,
which forces TLS checks that fail against self-signed or untrusted certificates
and on clients older than 11.4 where verification was off by default.

Switch to `--skip-ssl-verify-server-cert`, which explicitly disables
verification for the local test database. This silences the warning without
turning verification on. The database type auto-detection added in #297 is kept.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 47022941-64ab-4ddc-aa23-1219f55ed773

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mariadb-ssl-verify-skip

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Context/FeatureContext.php 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@schlessera
schlessera marked this pull request as ready for review July 21, 2026 10:51
@schlessera
schlessera requested a review from a team as a code owner July 21, 2026 10:51

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/Context/FeatureContext.php`:
- Around line 1344-1345: The MariaDB command construction in the database setup
flow, including this `self::run_sql` call and the other MariaDB call sites in
`FeatureContext.php`, must not use `--skip-ssl-verify-server-cert` because it
permits unencrypted connections. Replace it with a MariaDB option that only
disables certificate verification, or apply the existing option exclusively when
`WP_CLI_TEST_DBHOST` resolves to a loopback host, while preserving secure
connections for non-local hosts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a129a36-9f4e-437e-a4cc-a04b77b5d70a

📥 Commits

Reviewing files that changed from the base of the PR and between fce2eb2 and a626a20.

📒 Files selected for processing (1)
  • src/Context/FeatureContext.php

Comment thread src/Context/FeatureContext.php
@schlessera schlessera added this to the 5.1.12 milestone Jul 21, 2026
@schlessera
schlessera merged commit 0c0b800 into main Jul 21, 2026
84 checks passed
@schlessera
schlessera deleted the fix/mariadb-ssl-verify-skip branch July 21, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant