Conversation
`ee site update --ssl=off` stores site_ssl as '0' and leaves the LE cert files on disk, so the `empty()` gate still flipped explicitly disabled sites back to `le` (renewed by cron and re-enabled on the next compose regeneration). Only repair a never-set flag (NULL or '').
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
20250927101545_..._fix_ssl_flag_for_existing_le_certsmigration auto-setssite_ssl = 'le'for sites that have LE-looking cert files on disk and a Let's Encrypt issuer. Its gateempty( $db_ssl ) || $db_ssl !== 'le'matches any non-lesite — including ones explicitly created with--ssl=custom(alsoself/inherit). A custom site using a Let's Encrypt-issued cert (with a.chain.pempresent) would be silently reclassified toleand pulled into automatic LE renewal that can overwrite or break the user's certificate.Fix
Narrow the gate to
null === $db_ssl || '' === $db_ssl— repair only sites whose SSL flag is genuinely unset (the migration's intent). Explicitcustom/self/inherit(andle) choices are never overridden, and neither is'0', the valueee site update --ssl=offstores (empty()would still have matched it and turned SSL back on in the DB for a site serving plain HTTP).down()remains a no-op (forward-only). The boolean change preserves the un-flagged-LE repair case and removes only the unwanted override (the old|| $db_ssl !== 'le'half was already redundant for thelecase).Note
A site whose flag was explicitly set to a wrong non-empty value will no longer be auto-corrected — an intentional, conservative trade-off: a data migration should not override an explicit user choice.
This migration shipped in site-command v3.6.0, and a migration runs only once per install, so this change only affects installs upgrading from a version older than v3.6.0. Sites already reclassified on existing installs stay
le(their original flag is recorded in/opt/easyengine/.backup/.ssl-fix.log); repairing them would need a new forward migration.Testing
Tested on Ubuntu 26.04 with EasyEngine 4.12.0 by re-running the migration against custom, self-signed, SSL-off (
'0'), NULL and empty-flag sites, each with a cert whose issuer contains "Let's Encrypt" plus a chain file: only the NULL and empty-flag sites are set tole; the others keep their flag.