fixed issue 488, important security issues, monkeypatch pymysql, thanks Roman

This commit is contained in:
mdipierro
2012-08-07 14:04:19 -05:00
parent 3004345180
commit 8a7bd3c38b
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-08-07 12:26:30) dev
Version 2.00.0 (2012-08-07 14:04:15) dev
+5
View File
@@ -253,6 +253,11 @@ if not 'google' in drivers:
# first try contrib driver, then from site-packages (if installed)
try:
import contrib.pymysql as pymysql
# monkeypatch pymysql because they havent fixed the bug:
# https://github.com/petehunt/PyMySQL/issues/86
pymysql.ESCAPE_REGEX = re.compile("'")
pymysql.ESCAPE_MAP = {"'": "''"}
# end monkeypatch
except ImportError:
import pymysql
drivers.append('pymysql')