mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-30 09:35:39 -05:00
remove password for connection string non sql auth types (#19484)
* remove password for connection string non sql auth types * add comment * fix test
This commit is contained in:
@@ -578,6 +578,12 @@ export async function promptConnectionStringPasswordAndUpdateConnectionString(co
|
||||
// or user chooses to not include password (or if user cancels out of include password prompt), or authentication type is not SQL login
|
||||
connectionString = await vscodeMssqlApi.getConnectionString(connectionDetails, false, false);
|
||||
|
||||
if (connectionInfo.authenticationType !== 'SqlLogin') {
|
||||
// temporarily fix until STS is fix to not include the placeholder: https://github.com/microsoft/sqltoolsservice/issues/1508
|
||||
// if authentication type is not SQL login, remove password in connection string
|
||||
connectionString = connectionString.replace(`Password=${constants.passwordPlaceholder};`, '');
|
||||
}
|
||||
|
||||
if (!connectionInfo.password && connectionInfo.authenticationType === 'SqlLogin') {
|
||||
// if a connection exists but does not have password saved we ask user if they would like to enter it and save it in local.settings.json
|
||||
userPassword = await vscode.window.showInputBox({
|
||||
|
||||
Reference in New Issue
Block a user