Skip to content

Commit

Permalink
fix(mssql): ensure that we only escape passwords if the password is n…
Browse files Browse the repository at this point in the history
…ot `None`
  • Loading branch information
cpcloud committed Feb 12, 2025
1 parent e2b0dec commit e589344
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ibis/backends/mssql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,13 @@ def do_connect(
# connection string and use it as a database
kwargs["database"] = database

if password is not None:
password = self._escape_special_characters(password)

self.con = pyodbc.connect(
user=user,
server=f"{host},{port}",
password=self._escape_special_characters(password),
password=password,
driver=driver,
**kwargs,
)
Expand Down

0 comments on commit e589344

Please sign in to comment.