mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
applying contributed patch for DB2
This commit is contained in:
@@ -2546,7 +2546,7 @@ def safeSQLIdentificatorNaming(name, isTable=False):
|
||||
if not re.match(r"\A[A-Za-z0-9_]+\Z", parts[i]):
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.ACCESS):
|
||||
parts[i] = "`%s`" % parts[i].strip("`")
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.PGSQL):
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.PGSQL, DBMS.DB2):
|
||||
parts[i] = "\"%s\"" % parts[i].strip("\"")
|
||||
|
||||
retVal = ".".join(parts)
|
||||
@@ -2563,7 +2563,7 @@ def unsafeSQLIdentificatorNaming(name):
|
||||
if isinstance(name, basestring):
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.ACCESS):
|
||||
retVal = name.replace("`", "")
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.PGSQL):
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.ORACLE, DBMS.PGSQL, DBMS.DB2):
|
||||
retVal = name.replace("\"", "")
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE):
|
||||
prefix = "%s." % DEFAULT_MSSQL_SCHEMA
|
||||
|
||||
Reference in New Issue
Block a user