Repository navigation
fix(site): stop the site search at / and validate --domain - #19
Merged
Merged
Conversation
- FindComposeFile stops at the home directory or at the filesystem root, so a command outside $HOME no longer loops forever. - FindComposeFile returns errors from UserHomeDir and Getwd, and ErrComposeNotFound when a site has no compose file. - --domain must be a valid hostname (labels of letters, digits and inner hyphens). This rejects path separators and '..', so the value cannot point outside the sites directory. Closes #3
nabil1440
force-pushed
the
blockers/3-site-lookup
branch
from
September 22, 2026 06:36
89e210c to
0dd9f78
Compare
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.
Change
FindComposeFilestops at the home directory or at the filesystem root. Before this change, a command outside$HOMEdid not stop and used 100% CPU.FindComposeFilereturns the errors fromos.UserHomeDirandos.Getwd. It returnsErrComposeNotFoundwhen the site has no compose file.--domainmust be a valid hostname: labels of letters, digits and inner hyphens, 1–63 characters each, 253 characters in total. Thus the value cannot contain/or...Behavior change
xn--…).Tests
$HOMEreturns in less than 2 s.$HOME.--domainfinds the site.fly startoutside$HOMEstops with the no-site error.--domain ../,..,example.com/../..anda/bshow "invalid domain". No Docker call occurs.Closes #3