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> {
1102
1102
reporter && reporter . sendTelemetryEvent ( "extensionActivated" ) ;
1103
1103
1104
1104
// The API we export
1105
- const api = {
1105
+ const extensionApi = {
1106
1106
serverForUri ( uri : vscode . Uri ) : any {
1107
1107
const { apiTarget } = connectionTarget ( uri ) ;
1108
1108
const api = new AtelierAPI ( apiTarget ) ;
1109
1109
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 .
1113
1113
1114
1114
const {
1115
1115
serverName,
@@ -1131,7 +1131,12 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
1131
1131
port,
1132
1132
pathPrefix,
1133
1133
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" ) ,
1135
1140
namespace : ns ,
1136
1141
apiVersion : active ? apiVersion : undefined ,
1137
1142
} ;
@@ -1164,7 +1169,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
1164
1169
} ;
1165
1170
1166
1171
// 'export' our public API
1167
- return api ;
1172
+ return extensionApi ;
1168
1173
}
1169
1174
1170
1175
export function deactivate ( ) : void {
You can’t perform that action at this time.
0 commit comments