Skip to content

Commit 363a88d

Browse files
authored
unc - implement validation (microsoft#182286)
1 parent 23a98d3 commit 363a88d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/browser/workbench.contribution.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,9 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
696696
'security.allowedUNCHosts': {
697697
'type': 'array',
698698
'items': {
699-
'type': 'string'
699+
'type': 'string',
700+
'pattern': '^[^\\\\]+$',
701+
'patternErrorMessage': localize('security.allowedUNCHosts.patternErrorMessage', 'UNC host names must not contain backslashes.')
700702
},
701703
'default': [],
702704
'markdownDescription': localize('security.allowedUNCHosts', 'A set of UNC host names (without leading or trailing backslash, for example `192.168.0.1` or `my-server`) to allow without user confirmation. If a UNC host is being accessed that is not allowed via this setting or has not been acknowledged via user confirmation, an error will occur and the operation stopped. A restart is required when changing this setting. Find out more about this setting at https://aka.ms/vscode-windows-unc.'),

0 commit comments

Comments
 (0)