Merge pull request #6 from venkateshpabbati/alert-autofix-7
Potential fix for code scanning alert no. 7: Clear-text logging of sensitive information
This commit is contained in:
@@ -46,9 +46,9 @@ class TiDB:
|
||||
|
||||
try:
|
||||
self.engine = create_engine(connection_string)
|
||||
logger.info(f"Connected to TiDB database at {self.database}")
|
||||
logger.info("Connected to TiDB database")
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to connect to TiDB database at {self.database}")
|
||||
logger.error("Failed to connect to TiDB database")
|
||||
logger.error(f"TiDB database error: {e}")
|
||||
raise
|
||||
|
||||
@@ -57,13 +57,13 @@ class TiDB:
|
||||
try:
|
||||
await self.query(f"SELECT 1 FROM {k}".format(k=k))
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to check table {k} in TiDB database")
|
||||
logger.error("Failed to check table in TiDB database")
|
||||
logger.error(f"TiDB database error: {e}")
|
||||
try:
|
||||
await self.execute(v["ddl"])
|
||||
logger.info(f"Created table {k} in TiDB database")
|
||||
logger.info("Created table in TiDB database")
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to create table {k} in TiDB database")
|
||||
logger.error("Failed to create table in TiDB database")
|
||||
logger.error(f"TiDB database error: {e}")
|
||||
|
||||
async def query(
|
||||
|
Reference in New Issue
Block a user