Merge pull request #3 from venkateshpabbati/alert-autofix-14
Potential fix for code scanning alert no. 14: Clear-text logging of sensitive information
This commit is contained in:
commit
460bc4d16a
1 changed files with 1 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ class TiDB:
|
|||
try:
|
||||
result = conn.execute(text(sql), params)
|
||||
except Exception as e:
|
||||
sanitized_params = sanitize_sensitive_info(params)
|
||||
sanitized_params = sanitize_sensitive_info(params)
|
||||
logger.error(f"Tidb database,\nsql:{sql},\nparams:{sanitized_params},\nerror:{sanitize_sensitive_info({'error': str(e)})}")
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue