Commit f249704
committed
fix: escape postgres password in shell, not via psql -v binding
The previous wrapper passed the password through `psql -v pass=...` and `:'pass'` substitution. psql 18's -c parser doesn't expand the variable in that position — postgres logged `syntax error at or near ":"` on every start and the ALTER never ran. Switch to a straightforward shell-side single-quote-doubling escape and interpolate directly into the SQL. Same security bound (the only character that can escape a standard-conforming SQL string literal is `'`, doubled to `''`), and it actually works.1 parent d0ad9e5 commit f249704
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments