Skip to content

Commit 28b8e3a

Browse files
committed
Merge remote-tracking branch 'upstream/prerelease' into pre-fix-900
2 parents cae6237 + 3ec2dea commit 28b8e3a

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-objectscript",
33
"displayName": "InterSystems ObjectScript",
44
"description": "InterSystems ObjectScript language support for Visual Studio Code",
5-
"version": "1.9.2022080801-SNAPSHOT",
5+
"version": "1.9.2022080802-SNAPSHOT",
66
"icon": "images/logo.png",
77
"aiKey": "9cd75d51-697c-406c-a929-2bcf46e97c64",
88
"categories": [

src/extension.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,14 +1147,14 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
11471147
reporter && reporter.sendTelemetryEvent("extensionActivated");
11481148

11491149
// The API we export
1150-
const api = {
1150+
const extensionApi = {
11511151
serverForUri(uri: vscode.Uri): any {
11521152
const { apiTarget } = connectionTarget(uri);
11531153
const api = new AtelierAPI(apiTarget);
11541154

1155-
// We explicitly no longer expose the password for named servers.
1156-
// API client extensions can use Server Manager 3's authentication provider to get this,
1157-
// which will require user consent.
1155+
// This function intentionally no longer exposes the password for a named server UNLESS it is already exposed as plaintext in settings.
1156+
// API client extensions should use Server Manager 3's authentication provider to request a missing password themselves,
1157+
// which will require explicit user consent to divulge the password to the requesting extension.
11581158

11591159
const {
11601160
serverName,
@@ -1176,7 +1176,12 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
11761176
port,
11771177
pathPrefix,
11781178
username,
1179-
password: serverName === "" ? password : undefined,
1179+
password:
1180+
serverName === ""
1181+
? password
1182+
: vscode.workspace
1183+
.getConfiguration(`intersystems.servers.${serverName.toLowerCase()}`, uri)
1184+
.get("password"),
11801185
namespace: ns,
11811186
apiVersion: active ? apiVersion : undefined,
11821187
};
@@ -1209,7 +1214,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
12091214
};
12101215

12111216
// 'export' our public API
1212-
return api;
1217+
return extensionApi;
12131218
}
12141219

12151220
export function deactivate(): void {

0 commit comments

Comments
 (0)