Enable empty passwords (#2021)

This commit is contained in:
Simon Sabin
2023-04-20 16:49:47 +01:00
committed by GitHub
parent 051fad128d
commit 96c5ec81e2
2 changed files with 32 additions and 3 deletions

View File

@@ -1377,7 +1377,10 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
break;
case SqlLogin:
connectionBuilder.UserID = connectionDetails.UserName;
connectionBuilder.Password = connectionDetails.Password;
if (!string.IsNullOrEmpty(connectionDetails.Password))
{
connectionBuilder.Password = connectionDetails.Password;
}
connectionBuilder.Authentication = SqlAuthenticationMethod.SqlPassword;
break;
case AzureMFA: