| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…-based approach - move sanitize_connection_string() to connection_string_parser.py using _ConnectionStringParser for correct ODBC braced-value handling - helpers.py retains thin delegate for backward compatibility - connection.py imports directly from connection_string_parser - on parse failure, redact entire string instead of regex fallback - add 5 new tests for braced values, escaped braces, and edge cases
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changes
Summary
📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.pybind.ddbc_bindings.h: 67.8%
mssql_python.row.py: 70.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 74.5%
mssql_python.pybind.connection.connection.cpp: 75.8%
mssql_python.__init__.py: 77.3%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 85.3%🔗 Quick Links
|
Sorry, something went wrong.
There was a problem hiding this comment.
Refactors connection string sanitization to use the existing ODBC connection string parser/builder instead of a regex, improving correctness for braced values and escaped braces per MS-ODBCSTR.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_007_logging.py | Adds/updates unit tests for password masking (including braced and malformed cases). |
| mssql_python/helpers.py | Replaces regex sanitizer with a delegation wrapper to the parser-based implementation. |
| mssql_python/connection_string_parser.py | Introduces the new parser-based sanitizer and sensitive key list. |
| mssql_python/connection.py | Updates imports to use the new sanitizer directly for connection logging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
PR LGTM! 👍
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Work Item / Issue Reference
Summary
Replaces the regex-based sanitize_connection_string() with a parser-based implementation
that uses _ConnectionStringParser to correctly handle all ODBC connection string value
formats including braced values per ODBC spec.
Changes
belongs alongside the parser it depends on — eliminates circular import between helpers
and parser modules
Testing