Conversation
…, eliminate IFS manipulation Agent-Logs-Url: https://github.com/EngineScript/EngineScript/sessions/d9673092-1c89-400b-80ee-c42f94b6577b Co-authored-by: PDowney <[email protected]>
Copilot
AI
changed the title
[WIP] Fix usage of local keyword in vhost-install script
fix(vhost-install): remove invalid Apr 12, 2026
local outside functions, fix printf quoting, eliminate IFS manipulation
|
PDowney
approved these changes
Apr 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens shell correctness in the vhost installation flow (vhost-install.sh) by removing invalid local usage in the script body, adjusting SQL statement construction, and avoiding IFS-based array joining; it also documents these updates in the project changelog.
Changes:
- Build
MULTIPART_SUFFIX_CASE_PATTERNviaprintf+ trailing separator trim rather than anIFS-based join. - Remove
localdeclarations that were placed outside function scope and therefore ineffective. - Adjust
printf -vSQL format-string quoting forCREATE DATABASEand record the changes inCHANGELOG.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/functions/vhost/vhost-install.sh | Removes invalid local usage, updates SQL string construction, and changes how multipart suffix patterns are built. |
| CHANGELOG.md | Documents the vhost-install shell correctness/security adjustments made in this PR. |
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.



Four shell correctness and security issues in
scripts/functions/vhost/vhost-install.sh.Software Version Updates
N/A — shell script correctness and security fixes only.
Changed Versions
No version changes.
Version Diff
Verification Checklist
localkeyword no longer used outside function scopeprintf -vformat string uses double quotes; backtick identifiers escaped correctly as\`MULTIPART_SUFFIX_CASE_PATTERNbuilt without IFS mutation — no word-splitting side-effectsNotes
localoutside functions (×2):local create_db_sqlandlocal SQL_ESCAPED_PSWDappeared at script body level wherelocalis a no-op. Both declarations removed; variables are written directly.printfformat string (SC2016): format string switched to double quotes with escaped backticks (```) so the quoting style is consistent and the linter warning is resolved.$(IFS='|'; ...)replaced withprintf '%s|' "${array[@]}"+${var%|}trim — joins array elements with|without touching IFS.Original prompt