Commit 9da2c607 authored by David Fernandez's avatar David Fernandez

Merge branch 'sh-fix-multipart-400-visibility-error' into 'master'

Fix 400 errors not being logged in multipart middleware

See merge request gitlab-org/gitlab!66595
parents f0287c6b 25a7daed
......@@ -177,7 +177,7 @@ module Gitlab
@app.call(env)
end
rescue UploadedFile::InvalidPathError => e
[400, { 'Content-Type' => 'text/plain' }, e.message]
[400, { 'Content-Type' => 'text/plain' }, [e.message]]
end
end
end
......
......@@ -77,7 +77,8 @@ RSpec.describe Gitlab::Middleware::Multipart do
result = subject
expect(result[0]).to eq(400)
expect(result[2]).to include('insecure path used')
expect(result[2]).to be_a(Array)
expect(result[2].first).to include('insecure path used')
end
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