From: <gha...@us...> - 2006-06-07 18:06:57
|
Update of /cvsroot/pypgsql/pypgsql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4455 Modified Files: ChangeLog libpqmodule.c setup.py Log Message: Patch for a security hole in PostgreSQL (CVE-2006-2314): escaping quotes with backslashes is insecure. The change is to escape single quotes with another single quote: \' => ''. Thanks to Martin Pitt for the patch. Index: ChangeLog =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/ChangeLog,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ChangeLog 3 Jun 2006 00:13:34 -0000 1.22 --- ChangeLog 7 Jun 2006 17:21:28 -0000 1.23 *************** *** 1,4 **** --- 1,12 ---- #ident "$Id$" + Changes since pyPgSQL Version 2.5 + ================================= + + Patch for a security hole in PostgreSQL (CVE-2006-2314): escaping quotes with + backslashes is insecure. The change is to escape single quotes with + another single quote: \' => ''. Thanks to Martin Pitt for the patch. + + Changes since pyPgSQL Version 2.4 ================================= Index: libpqmodule.c =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/libpqmodule.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** libpqmodule.c 9 Apr 2005 02:19:41 -0000 1.32 --- libpqmodule.c 7 Jun 2006 17:21:28 -0000 1.33 *************** *** 32,35 **** --- 32,39 ---- | Date Ini Description | | --------- --- ------------------------------------------------------- | + | 07JUN2006 gh Patch for a security hole in PostgreSQL (CVE-2006-2314):| + | escaping quotes with backslashes is insecure. The | + | change is to escape single quotes with another single | + | quote: \' => ''. | | 08APR2005 bga Un-did one of the fixes put in on 01MAR2005. It wasn't | | broke until I 'fixed' it. | *************** *** 132,136 **** | 2. The backslash is quoted as \\. | | | ! | 3. The single quote is quoted as \'. | | | | 4. All other characters are unchanged. | --- 136,140 ---- | 2. The backslash is quoted as \\. | | | ! | 3. The single quote is quoted as ''. | | | | 4. All other characters are unchanged. | *************** *** 151,155 **** | | | 2. The backslash is escpaed as \\\\. | ! | 3. The single quote is escaped as \'. | | 4. The double quote is escaped as \\". | | 5. All other characters are unchanged. | --- 155,159 ---- | | | 2. The backslash is escpaed as \\\\. | ! | 3. The single quote is escaped as ''. | | 4. The double quote is escaped as \\". | | 5. All other characters are unchanged. | *************** *** 190,194 **** case '\'': ! sout[j++] = '\\'; sout[j++] = sin[i]; break; --- 194,198 ---- case '\'': ! sout[j++] = '\''; sout[j++] = sin[i]; break; *************** *** 272,276 **** | 3. The backslash is escaped as \\\\. | | | ! | 4. The single quote is escaped as \'. | | | | 5. All other characters are unchanged. | --- 276,280 ---- | 3. The backslash is escaped as \\\\. | | | ! | 4. The single quote is escaped as ''. | | | | 5. All other characters are unchanged. | *************** *** 281,285 **** | 2. Non-printable characters are escapes as \\\\OOO. | | 3. The backslash is escpaed as \\\\\\\\. | ! | 4. The single quote is escaped as \'. | | 5. The double quote is escaped as \\". | | 6. All other characters are unchanged. | --- 285,289 ---- | 2. Non-printable characters are escapes as \\\\OOO. | | 3. The backslash is escpaed as \\\\\\\\. | ! | 4. The single quote is escaped as ''. | | 5. The double quote is escaped as \\". | | 6. All other characters are unchanged. | *************** *** 319,323 **** case '\'': ! sout[j++] = '\\'; sout[j++] = sin[i]; break; --- 323,327 ---- case '\'': ! sout[j++] = '\''; sout[j++] = sin[i]; break; Index: setup.py =================================================================== RCS file: /cvsroot/pypgsql/pypgsql/setup.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** setup.py 2 Jun 2006 13:47:25 -0000 1.27 --- setup.py 7 Jun 2006 17:21:28 -0000 1.28 *************** *** 85,89 **** from distutils.extension import Extension ! __version__ = "2.5" # Define the runtime library path for this module. It starts out as None. --- 85,89 ---- from distutils.extension import Extension ! __version__ = "2.5.1" # Define the runtime library path for this module. It starts out as None. |