File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1102,14 +1102,14 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
11021102 reporter && reporter . sendTelemetryEvent ( "extensionActivated" ) ;
11031103
11041104 // The API we export
1105- const api = {
1105+ const extensionApi = {
11061106 serverForUri ( uri : vscode . Uri ) : any {
11071107 const { apiTarget } = connectionTarget ( uri ) ;
11081108 const api = new AtelierAPI ( apiTarget ) ;
11091109
1110- // We explicitly no longer expose the password for named servers .
1111- // API client extensions can use Server Manager 3's authentication provider to get this ,
1112- // which will require user consent.
1110+ // This function intentionally no longer exposes the password for a named server UNLESS it is already exposed as plaintext in settings .
1111+ // API client extensions should use Server Manager 3's authentication provider to request a missing password themselves ,
1112+ // which will require explicit user consent to divulge the password to the requesting extension .
11131113
11141114 const {
11151115 serverName,
@@ -1131,7 +1131,12 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
11311131 port,
11321132 pathPrefix,
11331133 username,
1134- password : serverName === "" ? password : undefined ,
1134+ password :
1135+ serverName === ""
1136+ ? password
1137+ : vscode . workspace
1138+ . getConfiguration ( `intersystems.servers.${ serverName . toLowerCase ( ) } ` , uri )
1139+ . get ( "password" ) ,
11351140 namespace : ns ,
11361141 apiVersion : active ? apiVersion : undefined ,
11371142 } ;
@@ -1164,7 +1169,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
11641169 } ;
11651170
11661171 // 'export' our public API
1167- return api ;
1172+ return extensionApi ;
11681173}
11691174
11701175export function deactivate ( ) : void {
You can’t perform that action at this time.
0 commit comments