core: don't allow '/' in VM name [GH-4289]
This commit is contained in:
parent
b675be383b
commit
a53156e426
|
@ -662,7 +662,7 @@ module VagrantPlugins
|
|||
|
||||
# Validate sub-VMs if there are any
|
||||
@__defined_vms.each do |name, _|
|
||||
if name =~ /[\[\]\{\}]/
|
||||
if name =~ /[\[\]\{\}\/]/
|
||||
errors["vm"] << I18n.t(
|
||||
"vagrant.config.vm.name_invalid",
|
||||
name: name)
|
||||
|
|
|
@ -132,6 +132,7 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
|
|||
[
|
||||
"foo [1]",
|
||||
"bar {2}",
|
||||
"foo/bar",
|
||||
].each do |name|
|
||||
it "should disallow names with brackets" do
|
||||
subject.define name
|
||||
|
|
Loading…
Reference in New Issue