mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-20 22:49:59 +00:00
Minor bug for SQLAlchemy util class
This commit is contained in:
parent
4b08aaffd6
commit
000c4e5689
3 changed files with 5 additions and 3 deletions
|
|
@ -122,6 +122,8 @@ class SQLAlchemy(GenericConnector):
|
|||
|
||||
try:
|
||||
self.cursor = self.connector.execute(query)
|
||||
if hasattr(self.connector, "commit"): # Note: SQLAlchemy 2.0+ dropped implicit autocommit (otherwise DML changes - e.g. via --sql-query - would be silently lost)
|
||||
self.connector.commit()
|
||||
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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue