hosts/bad: escape regexp properly [GH-4922]
This commit is contained in:
parent
ff987b19ec
commit
2a285d7655
|
@ -137,7 +137,7 @@ module VagrantPlugins
|
|||
user = Process.uid
|
||||
|
||||
File.read("/etc/exports").lines.each do |line|
|
||||
if id = line[/^# VAGRANT-BEGIN:( #{user})? ([\.\/A-Za-z0-9-_]+?)$/, 2]
|
||||
if id = line[/^# VAGRANT-BEGIN:( #{user})? ([\.\/A-Za-z0-9\-_]+?)$/, 2]
|
||||
if valid_ids.include?(id)
|
||||
logger.debug("Valid ID: #{id}")
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue