Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sunny/handle_invalid_percent_encoding_requests

Rails Engine to handle badly encoded requests
https://github.com/sunny/handle_invalid_percent_encoding_requests

Last synced: about 17 hours ago
JSON representation

Rails Engine to handle badly encoded requests

Awesome Lists containing this 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`:

```rb
# 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](http://stackoverflow.com/q/24648206/311657) on StackOverflow.