mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
fix: allow underscore as a valid char in tunnel remote address (#190904)
adjust the regexes used to validate tunnel remote addresses, add underscore as a valid char.
This commit is contained in:
parent
548c32e80c
commit
d0b14e8569
|
@ -24,7 +24,7 @@
|
|||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^([a-z0-9-]+):(\\d{1,5})$"
|
||||
"pattern": "^([a-z0-9_-]+):(\\d{1,5})$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ export interface Tunnel {
|
|||
}
|
||||
|
||||
export function parseAddress(address: string): { host: string; port: number } | undefined {
|
||||
const matches = address.match(/^([a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*:)?([0-9]+)$/);
|
||||
const matches = address.match(/^([a-zA-Z0-9_-]+(?:\.[a-zA-Z0-9_-]+)*:)?([0-9]+)$/);
|
||||
if (!matches) {
|
||||
return undefined;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue