We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16e3a0c commit cb2daeaCopy full SHA for cb2daea
mssql_python/auth.py
@@ -229,9 +229,9 @@ def extract_auth_type(connection_string: str) -> Optional[str]:
229
AuthType.DEFAULT.value: "default",
230
}
231
for part in connection_string.split(";"):
232
- part = part.strip()
233
- if part.lower().startswith("authentication="):
234
- return auth_map.get(part.split("=", 1)[1].strip().lower())
+ key, _, value = part.strip().partition("=")
+ if key.strip().lower() == "authentication":
+ return auth_map.get(value.strip().lower())
235
return None
236
237
0 commit comments