Low commit activity in last 3 years
No release in over a year
Render 400 error whenever a request's %-encoding is malformed
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

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.