diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-06 11:31:08 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-06 11:31:08 +0200 |
commit | c922fb4b68e3d57bf5328b6825040f1871a48b66 (patch) | |
tree | 8a675f474a8d83b08e830f2343e2601ef5155bc8 /lib | |
parent | 80b3dcc777c72ee1853b4228baf6310ccd5e44d8 (diff) | |
download | gitlab-ce-c922fb4b68e3d57bf5328b6825040f1871a48b66.tar.gz |
Respond with a bad request if artifact path is invalid
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/helpers.rb | 2 | ||||
-rw-r--r-- | lib/api/job_artifacts.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 6fa1527461f..e646c63467a 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -222,7 +222,7 @@ module API def bad_request!(attribute) message = ["400 (Bad request)"] - message << "\"" + attribute.to_s + "\" not given" + message << "\"" + attribute.to_s + "\" not given" if attribute render_api_error!(message.join(' '), 400) end diff --git a/lib/api/job_artifacts.rb b/lib/api/job_artifacts.rb index e0c5449e65e..2a8fa7659bf 100644 --- a/lib/api/job_artifacts.rb +++ b/lib/api/job_artifacts.rb @@ -52,7 +52,7 @@ module API path = Gitlab::Ci::Build::Artifacts::Path .new(params[:artifact_path]) - not_found! unless path.valid? + bad_request! unless path.valid? send_artifacts_entry(build, path) end |