gate2: fix shell quote conflict in prestart.sh — use string concat instead of f-string for ALTER ROLE

This commit is contained in:
Agent Zero
2026-07-31 21:49:45 +02:00
parent 2a7412e49f
commit 68db50544c
+1 -1
View File
@@ -57,7 +57,7 @@ async def set_passwords():
try: try:
# ALTER ROLE doesn't support prepared statement parameters # ALTER ROLE doesn't support prepared statement parameters
# so we inline the password (extracted from DB URL, safe) # so we inline the password (extracted from DB URL, safe)
await conn.execute(text(f"ALTER ROLE {role} WITH LOGIN PASSWORD '{pwd}'")) await conn.execute(text("ALTER ROLE " + role + " WITH LOGIN PASSWORD '" + pwd + "'"))
print(f'[prestart] Password set for {role}') print(f'[prestart] Password set for {role}')
except Exception as e: except Exception as e:
print(f'[prestart] WARNING: Could not set password for {role}: {e}') print(f'[prestart] WARNING: Could not set password for {role}: {e}')