fixed issue 488, important security issues, monkeypatch pymysql, thanks Roman
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.00.0 (2012-08-07 12:26:30) dev
|
||||
Version 2.00.0 (2012-08-07 14:04:15) dev
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user