Commit 84e37683 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make sure we remove null characters

parent 4d9c2bad
...@@ -1532,8 +1532,8 @@ describe Project, models: true do ...@@ -1532,8 +1532,8 @@ describe Project, models: true do
expect(project.ci_config_file).to eq('foo/.gitlab_ci.yml') expect(project.ci_config_file).to eq('foo/.gitlab_ci.yml')
end end
it 'sets a string but remove all leading slashes' do it 'sets a string but remove all leading slashes and null characters' do
project.update!(ci_config_file: '///foo//.gitlab_ci.yml') project.update!(ci_config_file: "///f\0oo/\0/.gitlab_ci.yml")
expect(project.ci_config_file).to eq('foo//.gitlab_ci.yml') expect(project.ci_config_file).to eq('foo//.gitlab_ci.yml')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment