Skip to content

Commit

Permalink
Fixes from release (#14720)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne authored Nov 14, 2023
1 parent 97d1128 commit 51b5bc7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 55 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ This changelog is deprecated. Here is where you can find details about the lates
- Highlighted features for the latest release are described in the VS Code release notes, under the "Contributions to extensions" section: https://code.visualstudio.com/updates
- All issues and code changes can be found by searching our Github repo under the latest milestone. [Example from November 2022](https://github.com/microsoft/vscode-jupyter/issues?q=is%3Aclosed+milestone%3A%22November+2022%22+)


## 2023.10.1100000000

### Fixes

1. Fixed vulnerability described in [CVE-2023-36018](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-36018)

## 2022.10.110 (2 November 2022)

### Enhancements
Expand Down
10 changes: 0 additions & 10 deletions src/kernels/raw/launcher/kernelProcess.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,16 +480,6 @@ export class KernelProcess implements IKernelProcess {
private addPythonConnectionArgs(connectionFile: Uri): string[] {
const newConnectionArgs: string[] = [];

newConnectionArgs.push(`--ip=${this._connection.ip}`);
newConnectionArgs.push(`--stdin=${this._connection.stdin_port}`);
newConnectionArgs.push(`--control=${this._connection.control_port}`);
newConnectionArgs.push(`--hb=${this._connection.hb_port}`);
newConnectionArgs.push(`--Session.signature_scheme="${this._connection.signature_scheme}"`);
newConnectionArgs.push(`--Session.key=b"${this._connection.key}"`); // Note we need the 'b here at the start for a byte string
newConnectionArgs.push(`--shell=${this._connection.shell_port}`);
newConnectionArgs.push(`--transport="${this._connection.transport}"`);
newConnectionArgs.push(`--iopub=${this._connection.iopub_port}`);

// Turn this on if you get desparate. It can cause crashes though as the
// logging code isn't that robust.
// if (isTestExecution()) {
Expand Down
48 changes: 3 additions & 45 deletions src/kernels/raw/launcher/kernelProcess.node.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,21 +305,7 @@ suite('kernel Process', () => {
when(pythonExecFactory.createActivatedEnvironment(anything())).thenResolve(instance(pythonProcess));
when(connectionMetadata.kind).thenReturn('startUsingPythonInterpreter');
when(connectionMetadata.kernelSpec).thenReturn(kernelSpec);
const expectedArgs = [
`-m`,
`ipykernel`,
`--ip=${connection.ip}`,
`--stdin=${connection.stdin_port}`,
`--control=${connection.control_port}`,
`--hb=${connection.hb_port}`,
`--Session.signature_scheme="${connection.signature_scheme}"`,
`--Session.key=b"${connection.key}"`,
`--shell=${connection.shell_port}`,
`--transport="${connection.transport}"`,
`--iopub=${connection.iopub_port}`,
`--f="${expectedConnectionFile}"`,
`--debug`
];
const expectedArgs = [`-m`, `ipykernel`, `--f="${expectedConnectionFile}"`, `--debug`];
await kernelProcess.launch(__dirname, 0, token.token);

verify(processService.execObservable(anything(), anything())).never();
Expand Down Expand Up @@ -353,21 +339,7 @@ suite('kernel Process', () => {
when(pythonExecFactory.createActivatedEnvironment(anything())).thenResolve(instance(pythonProcess));
when(connectionMetadata.kind).thenReturn('startUsingPythonInterpreter');
when(connectionMetadata.kernelSpec).thenReturn(kernelSpec);
const expectedArgs = [
`-m`,
`ipykernel`,
`--ip=${connection.ip}`,
`--stdin=${connection.stdin_port}`,
`--control=${connection.control_port}`,
`--hb=${connection.hb_port}`,
`--Session.signature_scheme="${connection.signature_scheme}"`,
`--Session.key=b"${connection.key}"`,
`--shell=${connection.shell_port}`,
`--transport="${connection.transport}"`,
`--iopub=${connection.iopub_port}`,
`--f="${Uri.file(tempFile).fsPath}"`,
`--debug`
];
const expectedArgs = [`-m`, `ipykernel`, `--f="${Uri.file(tempFile).fsPath}"`, `--debug`];
await kernelProcess.launch(__dirname, 0, token.token);

verify(processService.execObservable(anything(), anything())).never();
Expand All @@ -394,21 +366,7 @@ suite('kernel Process', () => {
when(pythonExecFactory.createActivatedEnvironment(anything())).thenResolve(instance(pythonProcess));
when(connectionMetadata.kind).thenReturn('startUsingPythonInterpreter');
when(connectionMetadata.kernelSpec).thenReturn(kernelSpec);
const expectedArgs = [
`-m`,
`ipykernel`,
`--ip=${connection.ip}`,
`--stdin=${connection.stdin_port}`,
`--control=${connection.control_port}`,
`--hb=${connection.hb_port}`,
`--Session.signature_scheme="${connection.signature_scheme}"`,
`--Session.key=b"${connection.key}"`,
`--shell=${connection.shell_port}`,
`--transport="${connection.transport}"`,
`--iopub=${connection.iopub_port}`,
`--f=${Uri.file('connection.json').fsPath}`,
`--debug`
];
const expectedArgs = [`-m`, `ipykernel`, `--f=${Uri.file('connection.json').fsPath}`, `--debug`];
await kernelProcess.launch(__dirname, 0, token.token);

verify(processService.execObservable(anything(), anything())).never();
Expand Down

0 comments on commit 51b5bc7

Please sign in to comment.