From 3eb09d7f57cc011deec5338ed3b73e943fba2ee3 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Fri, 16 Feb 2024 05:12:01 +0530 Subject: [PATCH] avoid sql placeholder --- flow/connectors/postgres/validate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flow/connectors/postgres/validate.go b/flow/connectors/postgres/validate.go index 4928e7c6d5..198f2ae0a0 100644 --- a/flow/connectors/postgres/validate.go +++ b/flow/connectors/postgres/validate.go @@ -67,7 +67,8 @@ func (c *PostgresConnector) CheckReplicationPermissions(ctx context.Context, use } var replicationRes bool - err := c.conn.QueryRow(ctx, "SELECT rolreplication FROM pg_roles WHERE rolname = $1", username).Scan(&replicationRes) + err := c.conn.QueryRow(ctx, "SELECT rolreplication FROM pg_roles WHERE rolname = "+ + QuoteLiteral(username)).Scan(&replicationRes) if err != nil { return err }