unc - implement validation (#182286)

This commit is contained in:
Benjamin Pasero
2023-05-12 12:28:31 +02:00
committed by GitHub
parent 23a98d32c6
commit 363a88dbaa

View File

@@ -696,7 +696,9 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
'security.allowedUNCHosts': {
'type': 'array',
'items': {
'type': 'string'
'type': 'string',
'pattern': '^[^\\\\]+$',
'patternErrorMessage': localize('security.allowedUNCHosts.patternErrorMessage', 'UNC host names must not contain backslashes.')
},
'default': [],
'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.'),