hosts/bad: escape regexp properly [GH-4922]

This commit is contained in:
Mitchell Hashimoto 2014-12-10 09:16:45 -08:00
parent ff987b19ec
commit 2a285d7655
1 changed files with 1 additions and 1 deletions

View File

@ -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