fix(migration): don't reclassify custom ssl sites as letsencrypt#490
Open
mrrobot47 wants to merge 1 commit into
Open
fix(migration): don't reclassify custom ssl sites as letsencrypt#490mrrobot47 wants to merge 1 commit into
mrrobot47 wants to merge 1 commit into
Conversation
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
empty( $db_ssl )— repair only sites whose SSL flag is genuinely unset (the migration's intent). Explicitcustom/self/inherit(andle) choices are never overridden.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.