Added symlink check to load_config.

This commit is contained in:
ethicalhack3r
2013-02-24 15:44:24 +01:00
parent 52b7aba348
commit 3c6292e9b4
2 changed files with 13 additions and 2 deletions

View File

@@ -137,7 +137,11 @@ class Browser
def load_config(config_file = nil)
@config_file = config_file || @config_file
data = JSON.parse(File.read(@config_file))
if File.symlink?(@config_file)
raise "[ERROR] #{config_file} is a symlink."
else
data = JSON.parse(File.read(@config_file))
end
ACCESSOR_OPTIONS.each do |option|
option_name = option.to_s