Fix DB rotate password syntax error (#191) - #200
Merged
Conversation
sehkone
force-pushed
the
octoaide/issue-191-2026-02-14T19-39-23
branch
from
February 15, 2026 11:49
56e2378 to
dea9a10
Compare
- Add unit tests for SQL literal escaping and SQL builders in db.rs. - Add ignored Docker-backed integration test for provision_db_sync create/update password paths.
- Add single-host DB guardrails for init, infra up, and rotate db. - Validate DB DSN host stays local-only. - Fail when postgres port mapping is not localhost-bound. - Add guardrail tests and update EN/KO installation docs. Closes #210
43 tasks
31 tasks
9 tasks
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.
Closes #191
Closes #210 (added by @sehkone)
Summary
This patch fixes a SQL syntax error that occurred when running
bootroot rotate dbto change the database user's password. PostgreSQL does not allow parameterized queries for DDL statements likeALTER ROLE ... WITH PASSWORDandCREATE ROLE ... WITH PASSWORD; the password must be supplied as a string literal.What I changed
ALTER ROLE ... WITH PASSWORDandCREATE ROLE ... WITH PASSWORDinstead of a parameterized$1placeholder.Why this fixes the issue
Parameterized parameters (
$1) are not supported in PostgreSQL for these DDL statements, which caused the syntax error seen in #191. By injecting a properly escaped string literal, the statements are valid SQL while preventing SQL injection via proper escaping of single quotes.Files changed (high level)
Notes
References
Fixes the root cause and ensures DB password rotation no longer produces a syntax error.