diff --git a/src/vs/server/node/serverConnectionToken.ts b/src/vs/server/node/serverConnectionToken.ts index 163597daca3ff..769ca56285aeb 100644 --- a/src/vs/server/node/serverConnectionToken.ts +++ b/src/vs/server/node/serverConnectionToken.ts @@ -85,7 +85,7 @@ export async function parseServerConnectionToken(args: ServerParsedArgs, default } if (!connectionTokenRegex.test(rawConnectionToken)) { - return new ServerConnectionTokenParseError(`The connection token defined in '${connectionTokenFile} does not adhere to the characters 0-9, a-z, A-Z or -.`); + return new ServerConnectionTokenParseError(`The connection token defined in '${connectionTokenFile} does not adhere to the characters 0-9, a-z, A-Z, _, or -.`); } return new MandatoryServerConnectionToken(rawConnectionToken); @@ -93,7 +93,7 @@ export async function parseServerConnectionToken(args: ServerParsedArgs, default if (typeof connectionToken !== 'undefined') { if (!connectionTokenRegex.test(connectionToken)) { - return new ServerConnectionTokenParseError(`The connection token '${connectionToken} does not adhere to the characters 0-9, a-z, A-Z or -.`); + return new ServerConnectionTokenParseError(`The connection token '${connectionToken} does not adhere to the characters 0-9, a-z, A-Z, _, or -.`); } if (compatibility) { diff --git a/src/vs/server/node/serverEnvironmentService.ts b/src/vs/server/node/serverEnvironmentService.ts index 432344f146a1e..45b04ba2a0e01 100644 --- a/src/vs/server/node/serverEnvironmentService.ts +++ b/src/vs/server/node/serverEnvironmentService.ts @@ -100,7 +100,7 @@ export interface ServerParsedArgs { /** * A secret token that must be provided by the web client with all requests. - * Use only `[0-9A-Za-z\-]`. + * Use only `[0-9A-Za-z_-]`. * * By default, a UUID will be generated every time the server starts up. * @@ -113,7 +113,7 @@ export interface ServerParsedArgs { * A path to a filename which will be read on startup. * Consider placing this file in a folder readable only by the same user (a `chmod 0700` directory). * - * The contents of the file will be used as the connection token. Use only `[0-9A-Z\-]` as contents in the file. + * The contents of the file will be used as the connection token. Use only `[0-9A-Za-z_-]` as contents in the file. * The file can optionally end in a `\n` which will be ignored. * * This secret must be communicated to any vscode instance via the resolver or embedder API. diff --git a/src/vs/workbench/api/common/extHostTypes.ts b/src/vs/workbench/api/common/extHostTypes.ts index f045831327431..5f41e8b8b9c96 100644 --- a/src/vs/workbench/api/common/extHostTypes.ts +++ b/src/vs/workbench/api/common/extHostTypes.ts @@ -492,7 +492,7 @@ export class ResolvedAuthority { throw illegalArgument('port'); } if (typeof connectionToken !== 'undefined') { - if (typeof connectionToken !== 'string' || connectionToken.length === 0 || !/^[0-9A-Za-z\-]+$/.test(connectionToken)) { + if (typeof connectionToken !== 'string' || connectionToken.length === 0 || !/^[0-9A-Za-z_\-]+$/.test(connectionToken)) { throw illegalArgument('connectionToken'); } }