Skip to content

Commit 03728a4

Browse files
committed
Bug fix (--common-columns on SQLite)
1 parent 47d2cf0 commit 03728a4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/core/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4068,9 +4068,9 @@ def safeSQLIdentificatorNaming(name, isTable=False):
40684068
if retVal.upper() in kb.keywords or (retVal or " ")[0].isdigit() or not re.match(r"\A[A-Za-z0-9_@%s\$]+\Z" % ('.' if _ else ""), retVal): # MsSQL is the only DBMS where we automatically prepend schema to table name (dot is normal)
40694069
retVal = unsafeSQLIdentificatorNaming(retVal)
40704070

4071-
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.ACCESS):
4071+
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.ACCESS, DBMS.SQLITE): # Note: in SQLite double-quotes are treated as string if column/identifier is non-existent (e.g. SELECT "foobar" FROM users)
40724072
retVal = "`%s`" % retVal
4073-
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.DB2, DBMS.SQLITE, DBMS.HSQLDB, DBMS.H2, DBMS.INFORMIX):
4073+
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.DB2, DBMS.HSQLDB, DBMS.H2, DBMS.INFORMIX):
40744074
retVal = "\"%s\"" % retVal
40754075
elif Backend.getIdentifiedDbms() in (DBMS.ORACLE,):
40764076
retVal = "\"%s\"" % retVal.upper()
@@ -4106,9 +4106,9 @@ def unsafeSQLIdentificatorNaming(name):
41064106
retVal = name
41074107

41084108
if isinstance(name, six.string_types):
4109-
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.ACCESS):
4109+
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.ACCESS, DBMS.SQLITE):
41104110
retVal = name.replace("`", "")
4111-
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.DB2, DBMS.SQLITE, DBMS.INFORMIX, DBMS.HSQLDB):
4111+
elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.DB2, DBMS.INFORMIX, DBMS.HSQLDB):
41124112
retVal = name.replace("\"", "")
41134113
elif Backend.getIdentifiedDbms() in (DBMS.ORACLE,):
41144114
retVal = name.replace("\"", "").upper()

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.11.108"
21+
VERSION = "1.3.11.109"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)