kyrofa / handle_invalid_percent_encoding_requests

Rails Engine to handle badly encoded requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle Invalid Percent Encoding Requests

Rails Engine that protects your app against malformed requests.

This middleware renders a 400 error instead of raising exceptions for the following errors:

  • invalid byte sequence in UTF-8
  • string contains null byte

Installation

In your Rails app, add these lines to your Gemfile:

# Helps against "invalid byte sequence" exceptions.
gem "handle_invalid_percent_encoding_requests"

Then type bundle install.

See also

See also Ruby on Rails “invalid byte sequence in UTF-8” due to bot on StackOverflow.

About

Rails Engine to handle badly encoded requests

License:MIT License


Languages

Language:Ruby 100.0%