Sha256: 738c734c7b039106697044878e8be174a7b0f9fe9586644b79248cf21e5d4c4d

Contents?: true

Size: 1.42 KB

Versions: 8

Compression:

Stored size: 1.42 KB

Contents

You should use protection!

This gem protects against typical web attacks.
Should work for all Rack apps, including Rails.

# Usage

Use all protections you probably want to use:

``` ruby
# config.ru
require 'rack/protection'
use Rack::Protection
run MyApp
```

Skip a single protection middleware:

``` ruby
# config.ru
require 'rack/protection'
use Rack::Protection, :except => :path_traversal
run MyApp
```

Use a single protection middleware:

``` ruby
# config.ru
require 'rack/protection'
use Rack::Protection::AuthenticityToken
run MyApp
```

# Prevented Attacks

## Cross Site Request Forgery

Prevented by:

* `Rack::Protection::AuthenticityToken` (not included by `use Rack::Protection`)
* `Rack::Protection::FormToken` (not included by `use Rack::Protection`)
* `Rack::Protection::JsonCsrf`
* `Rack::Protection::RemoteReferrer` (not included by `use Rack::Protection`)
* `Rack::Protection::RemoteToken`
* `Rack::Protection::HttpOrigin`

## Cross Site Scripting

Prevented by:

* `Rack::Protection::EscapedParams` (not included by `use Rack::Protection`)
* `Rack::Protection::XSSHeader` (Internet Explorer only)

## Clickjacking

Prevented by:

* `Rack::Protection::FrameOptions`

## Directory Traversal

Prevented by:

* `Rack::Protection::PathTraversal`

## Session Hijacking

Prevented by:

* `Rack::Protection::SessionHijacking`

## IP Spoofing

Prevented by:

* `Rack::Protection::IPSpoofing`

# Installation

    gem install rack-protection

Version data entries

8 entries across 6 versions & 2 rubygems

Version Path
torquebox-console-0.3.0 vendor/bundle/jruby/1.9/gems/rack-protection-1.4.0/README.md
torquebox-console-0.2.5 vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/README.md
torquebox-console-0.2.5 vendor/bundle/jruby/1.9/gems/rack-protection-1.4.0/README.md
rack-protection-1.5.0 README.md
torquebox-console-0.2.4 vendor/bundle/ruby/1.8/gems/rack-protection-1.4.0/README.md
torquebox-console-0.2.4 vendor/bundle/jruby/1.9/gems/rack-protection-1.4.0/README.md
torquebox-console-0.2.3 vendor/bundle/jruby/1.9/gems/rack-protection-1.4.0/README.md
rack-protection-1.4.0 README.md