mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-20 15:10:23 +00:00
Minor patches
This commit is contained in:
parent
d9a4a0992f
commit
97c8b45ccc
4 changed files with 22 additions and 3 deletions
|
|
@ -131,6 +131,15 @@ class SQLAlchemy(GenericConnector):
|
|||
retVal = True
|
||||
except (_sqlalchemy.exc.OperationalError, _sqlalchemy.exc.ProgrammingError) as ex:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % getSafeExString(ex))
|
||||
# Roll back the failed statement's transaction so it does not poison every following query with
|
||||
# 'InFailedSqlTransaction' (SQLAlchemy 2.0+ keeps the transaction open after an error). Without this
|
||||
# a single legitimately-failing probe - e.g. AURORA_VERSION() on vanilla PostgreSQL during
|
||||
# fingerprinting - made all later queries silently return wrong values (e.g. '--is-dba' read False)
|
||||
if hasattr(self.connector, "rollback"):
|
||||
try:
|
||||
self.connector.rollback()
|
||||
except Exception:
|
||||
pass
|
||||
except _sqlalchemy.exc.InternalError as ex:
|
||||
raise SqlmapConnectionException(getSafeExString(ex))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue