Skip to content

Use InvalidUTF8ErrorHandler only for rails 4

Jan Provaznik requested to merge rails5-fix-utf into master

What does this MR do?

In Rails 5 catches invalid UTF8 characters in querystring in a params middleware, errors are handled by a params middleware and raises a BadRequest exception. This means that these UTF8 errors are not raised deeper in application stack and these can't also be handled on application level.

If we would want to have custom handler for these errors, we would have to create a new middleware and insert it before actionpack's params middleware and rescue BadRequest exceptions there. But there is no need to do this currently (see discussion on https://gitlab.com/gitlab-org/gitlab-ce/issues/51908)

What are the relevant issue numbers?

Closes #51908 (closed)

Does this MR meet the acceptance criteria?

Merge request reports