gate2: fix shell quote conflict in prestart.sh — use string concat instead of f-string for ALTER ROLE
This commit is contained in:
+1
-1
@@ -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}')
|
||||||
|
|||||||
Reference in New Issue
Block a user