Skip to content
代码片段 群组 项目
提交 a7f76f47 编辑于 作者: George Koltsov's avatar George Koltsov
浏览文件

Merge branch 'sh-use-yaml-safe-load' into 'master'

Use YAML.safe_load_file for import/export config

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117027



Merged-by: default avatarGeorge Koltsov <gkoltsov@gitlab.com>
Approved-by: default avatarJoseph Wambua <jjoshua@gitlab.com>
Approved-by: default avatarGeorge Koltsov <gkoltsov@gitlab.com>
Co-authored-by: default avatarStan Hu <stanhu@gmail.com>
No related branches found
No related tags found
无相关合并请求
......@@ -52,7 +52,7 @@ def merge_ee?
end
def parse_yaml
YAML.load_file(@config)
YAML.safe_load_file(@config, aliases: true, permitted_classes: [Symbol])
end
end
end
......
......@@ -177,7 +177,8 @@
end
def setup_yaml(hash)
allow(YAML).to receive(:load_file).with(test_config).and_return(hash)
allow(YAML).to receive(:safe_load_file)
.with(test_config, aliases: true, permitted_classes: [Symbol]).and_return(hash)
end
end
end
......
......@@ -9,7 +9,7 @@
include ConfigurationHelper
let(:all_models_yml) { 'spec/lib/gitlab/import_export/all_models.yml' }
let(:all_models_hash) { YAML.load_file(all_models_yml) }
let(:all_models_hash) { YAML.safe_load_file(all_models_yml, aliases: true) }
let(:current_models) { setup_models }
let(:model_names) { relation_names_for(:project) }
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册