From 639a3ed0ac2e6855d16e70b9df6773b5e49fd5a8 Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Wed, 10 Feb 2016 15:00:48 +0530 Subject: [PATCH] Fixes the qtIdent function in the psycopg2 driver about not taking care of double quote within it. The 'replace' function of immutable type string do create a new instance of type string, which needed to be reassgined to the variable 'value'. Reported By: Murtuza Zabuawala --- web/pgadmin/utils/driver/psycopg2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py index 8da47341f..df1cde217 100644 --- a/web/pgadmin/utils/driver/psycopg2/__init__.py +++ b/web/pgadmin/utils/driver/psycopg2/__init__.py @@ -894,7 +894,7 @@ class Driver(BaseDriver): value = val if (Driver.needsQuoting(val, True)): - value.replace("\"", "\"\"") + value = value.replace("\"", "\"\"") value = "\"" + value + "\"" res = ((res and res + '.') or '') + value @@ -918,7 +918,7 @@ class Driver(BaseDriver): value = val if (Driver.needsQuoting(val, False)): - value.replace("\"", "\"\"") + value = value.replace("\"", "\"\"") value = "\"" + value + "\"" res = ((res and res + '.') or '') + value