From 10e1eecf3fc40fc67ee0a402898a1accf6d16061 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 7 Jul 2005 02:17:20 +0000 Subject: Leave it up to the user to decide if to escape the sequence name or not. --- ext/pdo_pgsql/pgsql_driver.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'ext/pdo_pgsql/pgsql_driver.c') diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 4f7bd2eceb..5dde6f2511 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -213,11 +213,6 @@ static char *pdo_pgsql_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned char *q; ExecStatusType status; - /* SQL injection protection */ - if (strchr(name, '\'')) { - return NULL; - } - spprintf(&q, sizeof("SELECT CURRVAL('')") + strlen(name), "SELECT CURRVAL('%s')", name); res = PQexec(H->server, q); efree(q); -- cgit v1.2.1