diff --git a/jdt-language-server-latest.tar.gz b/jdt-language-server-latest.tar.gz new file mode 100644 index 00000000..aa80e811 Binary files /dev/null and b/jdt-language-server-latest.tar.gz differ diff --git a/package.json b/package.json index 2a28a4af..b35bad76 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,8 @@ }, "stripe.projectName": { "type": "string", - "description": "the project name to read from for config (default \"default\")" + "description": "the project name to read from for config (default \"default\")", + "pattern": "^[a-zA-Z0-9_-\\s]+$" }, "stripe.telemetry.enabled": { "type": "boolean", diff --git a/src/stripeTerminal.ts b/src/stripeTerminal.ts index e78916f3..3b6872f0 100644 --- a/src/stripeTerminal.ts +++ b/src/stripeTerminal.ts @@ -38,15 +38,18 @@ export class StripeTerminal { 'stripe', new vscode.ShellExecution(cliPath, [ command, - ...args.map((arg) => ({ - quoting: vscode.ShellQuoting.Strong, - value: arg, - })), - ...globalCLIFlags.map((arg) => ({ - quoting: vscode.ShellQuoting.Strong, - value: arg, - })), - ]) + ...args, + ...globalCLIFlags + ], + { + shellQuoting: { + escape: { + escapeChar: '\\', + charsToEscape: '&`|"\'', + } + } + } + ) )); } @@ -54,7 +57,11 @@ export class StripeTerminal { private getGlobalCLIFlags(): Array { const stripeConfig = vscode.workspace.getConfiguration('stripe'); - const projectName = stripeConfig.get('projectName', null); + let projectName = stripeConfig.get('projectName', null); + if (projectName !== null) { + projectName = projectName.replace(/[\\"'`]/g, ''); + } + console.log({projectName}); const projectNameFlag = projectName ? ['--project-name', projectName] : [];