Repository navigation
fix(site): validate the site name and quote remote database check commands - #117
Merged
mrrobot47 merged 3 commits intoOct 12, 2026
Merged
Conversation
Validate the site name with site-command's validate_site_name() right after it is lowercased, before anything touches the shell, the file system or docker. Needs the site-command release that adds validate_site_name().
The remote DB checks on php site create put the DB host, port, user, password and the DB name (derived from the site name by default) in hand-written quotes nested inside a double-quoted sh -c/bash -c script, so a value containing a quote or shell syntax was not passed through as one argument. Quote each value for the inner shell and the whole script for the host shell with escapeshellarg().
… check site-command's create router validates the name as well; the guard keeps site-type-php working next to an older site-command instead of failing with an undefined function.
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.


Calls site-command's site-name validation on create (when available, EasyEngine/site-command#509), and quotes the values passed to the remote database check commands.