Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months ago
JSON representation
Rails Engine to handle badly encoded requests
- Host: GitHub
- URL: https://github.com/sunny/handle_invalid_percent_encoding_requests
- Owner: sunny
- License: mit
- Created: 2014-07-18T09:41:28.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2022-03-14T09:12:38.000Z (almost 3 years ago)
- Last Synced: 2024-10-09T22:18:19.268Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 18.6 KB
- Stars: 17
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: MIT-LICENSE
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.