omniauth-rails_csrf_protection 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -2
- data/lib/omniauth/rails_csrf_protection/token_verifier.rb +35 -11
- data/lib/omniauth/rails_csrf_protection/version.rb +1 -1
- data/test/test_helper.rb +21 -3
- metadata +3 -13
- data/.circleci/config.yml +0 -241
- data/.gitignore +0 -10
- data/.rubocop.yml +0 -9
- data/CODE_OF_CONDUCT.md +0 -75
- data/Gemfile +0 -11
- data/Rakefile +0 -10
- data/omniauth-rails_csrf_protection.gemspec +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3846d12e29003349aab3262355ab3caa8202537194bf6f46be894f616d17a723
|
|
4
|
+
data.tar.gz: c6458df501c2ca900d58cd1d5d87c10189e2c27a887f91c4de3c47d1ee7eae6c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 62351dc511a547b5f9983a3860e32be7e4ab66fd564f1d21533a5f97a60b6f31752823194342e5c37f4149ac93ef7ab99103330f3adef76e11c0dfc09e3cc49e
|
|
7
|
+
data.tar.gz: c2e6963ce81d58797117f512734eada4a98ec6b9fdeb8d124d239f8159b8341d9dba174e3e9d58b74fd96efd9aeb99ba5143b2c1b63364aaba14263058c68175
|
data/README.md
CHANGED
|
@@ -5,10 +5,23 @@ Forgery on the request phase when using OmniAuth gem with a Ruby on Rails
|
|
|
5
5
|
application) by implementing a CSRF token verifier that directly uses
|
|
6
6
|
`ActionController::RequestForgeryProtection` code from Rails.
|
|
7
7
|
|
|
8
|
-
[](https://circleci.com/gh/cookpad/omniauth-rails_csrf_protection/tree/main)
|
|
9
|
-
|
|
10
8
|
[CVE-2015-9284]: https://nvd.nist.gov/vuln/detail/CVE-2015-9284
|
|
11
9
|
|
|
10
|
+
> [!NOTE]
|
|
11
|
+
> [OmniAuth] has provided a built-in solution to mitigate against
|
|
12
|
+
> [CVE-2015-9284] since [version 2.0.0].
|
|
13
|
+
> You should be able to mitigate against this vulnerability
|
|
14
|
+
> by adding this configuration to your application:
|
|
15
|
+
>
|
|
16
|
+
> ```ruby
|
|
17
|
+
> OmniAuth.config.request_validation_phase = OmniAuth::AuthenticityTokenProtection.new(key: :_csrf_token)
|
|
18
|
+
> ```
|
|
19
|
+
>
|
|
20
|
+
> This gem will continued to be maintained as an alternative to the solution above.
|
|
21
|
+
|
|
22
|
+
[OmniAuth]: https://github.com/omniauth/omniauth
|
|
23
|
+
[Version 2.0.0]: https://github.com/omniauth/omniauth/releases/tag/v2.0.0
|
|
24
|
+
|
|
12
25
|
## Usage
|
|
13
26
|
|
|
14
27
|
Add this line to your application's Gemfile:
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
require "
|
|
1
|
+
require "action_pack/version"
|
|
2
2
|
require "action_controller"
|
|
3
3
|
|
|
4
|
+
unless ActionPack.version >= Gem::Version.new("8.1.a")
|
|
5
|
+
require "active_support/configurable"
|
|
6
|
+
end
|
|
7
|
+
|
|
4
8
|
module OmniAuth
|
|
5
9
|
module RailsCsrfProtection
|
|
6
10
|
# Provides a callable method that verifies Cross-Site Request Forgery
|
|
@@ -13,21 +17,41 @@ module OmniAuth
|
|
|
13
17
|
# authenticity token, you can find the source code at
|
|
14
18
|
# https://github.com/rails/rails/blob/v5.2.2/actionpack/lib/action_controller/metal/request_forgery_protection.rb#L217-L240.
|
|
15
19
|
class TokenVerifier
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
if ActionPack.version >= Gem::Version.new("8.1.a")
|
|
21
|
+
# `ActiveSupport::Configurable` is deprecated in Rails 8.1 and will be
|
|
22
|
+
# removed in Rails 8.2. As `ActionController::RequestForgeryProtection`
|
|
23
|
+
# directly accesing configurations via `config`, we only need to define
|
|
24
|
+
# these methods and delegate them to `ActionController::Base.config`.
|
|
25
|
+
def self.config
|
|
26
|
+
ActionController::Base.config
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def config
|
|
30
|
+
self.class.config
|
|
31
|
+
end
|
|
32
|
+
else
|
|
33
|
+
include ActiveSupport::Configurable
|
|
18
34
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
# `ActionController::RequestForgeryProtection` contains a few
|
|
36
|
+
# configurable options. As we want to make sure that our configuration is
|
|
37
|
+
# the same as what being set in `ActionController::Base`, we should make
|
|
38
|
+
# all out configuration methods to delegate to `ActionController::Base`.
|
|
39
|
+
config.each_key do |configuration_name|
|
|
40
|
+
undef_method configuration_name if defined?(configuration_name)
|
|
41
|
+
define_method configuration_name do
|
|
42
|
+
ActionController::Base.config[configuration_name]
|
|
43
|
+
end
|
|
27
44
|
end
|
|
28
45
|
end
|
|
29
46
|
|
|
47
|
+
# Include this module only after we've prepared the configuration
|
|
48
|
+
include ActionController::RequestForgeryProtection
|
|
49
|
+
|
|
30
50
|
def call(env)
|
|
51
|
+
dup._call(env)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def _call(env)
|
|
31
55
|
@request = ActionDispatch::Request.new(env.dup)
|
|
32
56
|
|
|
33
57
|
unless verified_request?
|
data/test/test_helper.rb
CHANGED
|
@@ -13,18 +13,29 @@ end
|
|
|
13
13
|
|
|
14
14
|
silence_warnings do
|
|
15
15
|
require "bundler/inline"
|
|
16
|
+
require "logger"
|
|
16
17
|
|
|
17
18
|
# Define dependencies required by this test app
|
|
18
19
|
gemfile do
|
|
19
20
|
source "https://rubygems.org"
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
if ENV["RAILS_VERSION"] == "edge"
|
|
23
|
+
gem "rails", git: "https://github.com/rails/rails.git", branch: "main"
|
|
24
|
+
else
|
|
25
|
+
gem "rails"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
if RUBY_VERSION >= "3.4"
|
|
29
|
+
gem "bigdecimal"
|
|
30
|
+
gem "mutex_m"
|
|
31
|
+
end
|
|
32
|
+
|
|
22
33
|
gem "omniauth"
|
|
23
34
|
gem "omniauth-rails_csrf_protection", path: File.expand_path("..", __dir__)
|
|
24
35
|
end
|
|
25
36
|
end
|
|
26
37
|
|
|
27
|
-
puts "Running test against Rails #{Rails.version}"
|
|
38
|
+
puts "Running test on Ruby #{RUBY_VERSION} against Rails #{Rails.version}"
|
|
28
39
|
|
|
29
40
|
require "rack/test"
|
|
30
41
|
require "action_controller/railtie"
|
|
@@ -34,7 +45,7 @@ require "minitest/autorun"
|
|
|
34
45
|
class TestApp < Rails::Application
|
|
35
46
|
config.root = __dir__
|
|
36
47
|
config.session_store :cookie_store, key: "cookie_store_key"
|
|
37
|
-
|
|
48
|
+
config.secret_key_base = "secret_key_base"
|
|
38
49
|
config.eager_load = false
|
|
39
50
|
config.hosts = []
|
|
40
51
|
|
|
@@ -52,6 +63,13 @@ class TestApp < Rails::Application
|
|
|
52
63
|
provider :developer
|
|
53
64
|
end
|
|
54
65
|
|
|
66
|
+
# Silence the deprecation warning in Rails 8.0.x
|
|
67
|
+
if Rails.version.is_a?(Gem::Version) &&
|
|
68
|
+
Rails.version >= Gem::Version.new("8.0.x") &&
|
|
69
|
+
Rails.version < Gem::Version.new("8.1")
|
|
70
|
+
config.active_support.to_time_preserves_timezone = :zone
|
|
71
|
+
end
|
|
72
|
+
|
|
55
73
|
# We need to call initialize! to run all railties
|
|
56
74
|
initialize!
|
|
57
75
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-rails_csrf_protection
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cookpad Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: actionpack
|
|
@@ -105,26 +104,18 @@ executables: []
|
|
|
105
104
|
extensions: []
|
|
106
105
|
extra_rdoc_files: []
|
|
107
106
|
files:
|
|
108
|
-
- ".circleci/config.yml"
|
|
109
|
-
- ".gitignore"
|
|
110
|
-
- ".rubocop.yml"
|
|
111
|
-
- CODE_OF_CONDUCT.md
|
|
112
|
-
- Gemfile
|
|
113
107
|
- LICENSE.txt
|
|
114
108
|
- README.md
|
|
115
|
-
- Rakefile
|
|
116
109
|
- lib/omniauth/rails_csrf_protection.rb
|
|
117
110
|
- lib/omniauth/rails_csrf_protection/railtie.rb
|
|
118
111
|
- lib/omniauth/rails_csrf_protection/token_verifier.rb
|
|
119
112
|
- lib/omniauth/rails_csrf_protection/version.rb
|
|
120
|
-
- omniauth-rails_csrf_protection.gemspec
|
|
121
113
|
- test/application_test.rb
|
|
122
114
|
- test/test_helper.rb
|
|
123
115
|
homepage: https://github.com/cookpad/omniauth-rails_csrf_protection
|
|
124
116
|
licenses:
|
|
125
117
|
- MIT
|
|
126
118
|
metadata: {}
|
|
127
|
-
post_install_message:
|
|
128
119
|
rdoc_options: []
|
|
129
120
|
require_paths:
|
|
130
121
|
- lib
|
|
@@ -139,8 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
139
130
|
- !ruby/object:Gem::Version
|
|
140
131
|
version: '0'
|
|
141
132
|
requirements: []
|
|
142
|
-
rubygems_version: 3.
|
|
143
|
-
signing_key:
|
|
133
|
+
rubygems_version: 3.6.9
|
|
144
134
|
specification_version: 4
|
|
145
135
|
summary: Provides CSRF protection on OmniAuth request endpoint on Rails application.
|
|
146
136
|
test_files:
|
data/.circleci/config.yml
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
version: 2.1
|
|
2
|
-
|
|
3
|
-
build_steps: &build_steps
|
|
4
|
-
steps:
|
|
5
|
-
- checkout
|
|
6
|
-
- run:
|
|
7
|
-
name: Install dependencies
|
|
8
|
-
command: bundle update
|
|
9
|
-
- run:
|
|
10
|
-
command: |-
|
|
11
|
-
echo "Ruby version:" $(ruby -v)
|
|
12
|
-
echo "Rails version: " $(rails -v)
|
|
13
|
-
name: Show build information
|
|
14
|
-
- run:
|
|
15
|
-
name: Run tests
|
|
16
|
-
command: rake
|
|
17
|
-
|
|
18
|
-
ruby-2-4: &ruby-2-4
|
|
19
|
-
docker:
|
|
20
|
-
- image: circleci/ruby:2.4
|
|
21
|
-
|
|
22
|
-
ruby-2-5: &ruby-2-5
|
|
23
|
-
docker:
|
|
24
|
-
- image: cimg/ruby:2.5
|
|
25
|
-
|
|
26
|
-
ruby-2-6: &ruby-2-6
|
|
27
|
-
docker:
|
|
28
|
-
- image: cimg/ruby:2.6
|
|
29
|
-
|
|
30
|
-
ruby-2-7: &ruby-2-7
|
|
31
|
-
docker:
|
|
32
|
-
- image: cimg/ruby:2.7
|
|
33
|
-
|
|
34
|
-
ruby-3-0: &ruby-3-0
|
|
35
|
-
docker:
|
|
36
|
-
- image: cimg/ruby:3.0
|
|
37
|
-
|
|
38
|
-
ruby-3-1: &ruby-3-1
|
|
39
|
-
docker:
|
|
40
|
-
- image: cimg/ruby:3.1
|
|
41
|
-
|
|
42
|
-
rails-4-2: &rails-4-2
|
|
43
|
-
environment:
|
|
44
|
-
RAILS_VERSION: "~> 4.2.0"
|
|
45
|
-
|
|
46
|
-
rails-5-0: &rails-5-0
|
|
47
|
-
environment:
|
|
48
|
-
RAILS_VERSION: "~> 5.0.0"
|
|
49
|
-
|
|
50
|
-
rails-5-1: &rails-5-1
|
|
51
|
-
environment:
|
|
52
|
-
RAILS_VERSION: "~> 5.1.0"
|
|
53
|
-
|
|
54
|
-
rails-5-2: &rails-5-2
|
|
55
|
-
environment:
|
|
56
|
-
RAILS_VERSION: "~> 5.2.0"
|
|
57
|
-
|
|
58
|
-
rails-6-0: &rails-6-0
|
|
59
|
-
environment:
|
|
60
|
-
RAILS_VERSION: "~> 6.0.0"
|
|
61
|
-
|
|
62
|
-
rails-6-1: &rails-6-1
|
|
63
|
-
environment:
|
|
64
|
-
RAILS_VERSION: "~> 6.1.0"
|
|
65
|
-
|
|
66
|
-
rails-7-0: &rails-7-0
|
|
67
|
-
environment:
|
|
68
|
-
RAILS_VERSION: "~> 7.0.0"
|
|
69
|
-
|
|
70
|
-
rails-edge: &rails-edge
|
|
71
|
-
environment:
|
|
72
|
-
RAILS_BRANCH: "main"
|
|
73
|
-
|
|
74
|
-
jobs:
|
|
75
|
-
"ruby-2-4-rails-4-2":
|
|
76
|
-
<<: *ruby-2-4
|
|
77
|
-
<<: *rails-4-2
|
|
78
|
-
<<: *build_steps
|
|
79
|
-
"ruby-2-4-rails-5-0":
|
|
80
|
-
<<: *ruby-2-4
|
|
81
|
-
<<: *rails-5-0
|
|
82
|
-
<<: *build_steps
|
|
83
|
-
"ruby-2-4-rails-5-1":
|
|
84
|
-
<<: *ruby-2-4
|
|
85
|
-
<<: *rails-5-1
|
|
86
|
-
<<: *build_steps
|
|
87
|
-
"ruby-2-4-rails-5-2":
|
|
88
|
-
<<: *ruby-2-4
|
|
89
|
-
<<: *rails-5-2
|
|
90
|
-
<<: *build_steps
|
|
91
|
-
|
|
92
|
-
"ruby-2-5-rails-5-0":
|
|
93
|
-
<<: *ruby-2-5
|
|
94
|
-
<<: *rails-5-0
|
|
95
|
-
<<: *build_steps
|
|
96
|
-
"ruby-2-5-rails-5-1":
|
|
97
|
-
<<: *ruby-2-5
|
|
98
|
-
<<: *rails-5-1
|
|
99
|
-
<<: *build_steps
|
|
100
|
-
"ruby-2-5-rails-5-2":
|
|
101
|
-
<<: *ruby-2-5
|
|
102
|
-
<<: *rails-5-2
|
|
103
|
-
<<: *build_steps
|
|
104
|
-
"ruby-2-5-rails-6-0":
|
|
105
|
-
<<: *ruby-2-5
|
|
106
|
-
<<: *rails-6-0
|
|
107
|
-
<<: *build_steps
|
|
108
|
-
"ruby-2-5-rails-6-1":
|
|
109
|
-
<<: *ruby-2-5
|
|
110
|
-
<<: *rails-6-1
|
|
111
|
-
<<: *build_steps
|
|
112
|
-
"ruby-2-5-rails-edge":
|
|
113
|
-
<<: *ruby-2-5
|
|
114
|
-
<<: *rails-edge
|
|
115
|
-
<<: *build_steps
|
|
116
|
-
|
|
117
|
-
"ruby-2-6-rails-5-0":
|
|
118
|
-
<<: *ruby-2-6
|
|
119
|
-
<<: *rails-5-0
|
|
120
|
-
<<: *build_steps
|
|
121
|
-
"ruby-2-6-rails-5-1":
|
|
122
|
-
<<: *ruby-2-6
|
|
123
|
-
<<: *rails-5-1
|
|
124
|
-
<<: *build_steps
|
|
125
|
-
"ruby-2-6-rails-5-2":
|
|
126
|
-
<<: *ruby-2-6
|
|
127
|
-
<<: *rails-5-2
|
|
128
|
-
<<: *build_steps
|
|
129
|
-
"ruby-2-6-rails-6-0":
|
|
130
|
-
<<: *ruby-2-6
|
|
131
|
-
<<: *rails-6-0
|
|
132
|
-
<<: *build_steps
|
|
133
|
-
"ruby-2-6-rails-6-1":
|
|
134
|
-
<<: *ruby-2-6
|
|
135
|
-
<<: *rails-6-1
|
|
136
|
-
<<: *build_steps
|
|
137
|
-
"ruby-2-6-rails-edge":
|
|
138
|
-
<<: *ruby-2-6
|
|
139
|
-
<<: *rails-edge
|
|
140
|
-
<<: *build_steps
|
|
141
|
-
|
|
142
|
-
"ruby-2-7-rails-5-0":
|
|
143
|
-
<<: *ruby-2-7
|
|
144
|
-
<<: *rails-5-0
|
|
145
|
-
<<: *build_steps
|
|
146
|
-
"ruby-2-7-rails-5-1":
|
|
147
|
-
<<: *ruby-2-7
|
|
148
|
-
<<: *rails-5-1
|
|
149
|
-
<<: *build_steps
|
|
150
|
-
"ruby-2-7-rails-5-2":
|
|
151
|
-
<<: *ruby-2-7
|
|
152
|
-
<<: *rails-5-2
|
|
153
|
-
<<: *build_steps
|
|
154
|
-
"ruby-2-7-rails-6-0":
|
|
155
|
-
<<: *ruby-2-7
|
|
156
|
-
<<: *rails-6-0
|
|
157
|
-
<<: *build_steps
|
|
158
|
-
"ruby-2-7-rails-6-1":
|
|
159
|
-
<<: *ruby-2-7
|
|
160
|
-
<<: *rails-6-1
|
|
161
|
-
<<: *build_steps
|
|
162
|
-
"ruby-2-7-rails-7-0":
|
|
163
|
-
<<: *ruby-2-7
|
|
164
|
-
<<: *rails-7-0
|
|
165
|
-
<<: *build_steps
|
|
166
|
-
"ruby-2-7-rails-edge":
|
|
167
|
-
<<: *ruby-2-7
|
|
168
|
-
<<: *rails-edge
|
|
169
|
-
<<: *build_steps
|
|
170
|
-
|
|
171
|
-
"ruby-3-0-rails-6-0":
|
|
172
|
-
<<: *ruby-3-0
|
|
173
|
-
<<: *rails-6-0
|
|
174
|
-
<<: *build_steps
|
|
175
|
-
"ruby-3-0-rails-6-1":
|
|
176
|
-
<<: *ruby-3-0
|
|
177
|
-
<<: *rails-6-1
|
|
178
|
-
<<: *build_steps
|
|
179
|
-
"ruby-3-0-rails-7-0":
|
|
180
|
-
<<: *ruby-3-0
|
|
181
|
-
<<: *rails-7-0
|
|
182
|
-
<<: *build_steps
|
|
183
|
-
"ruby-3-0-rails-edge":
|
|
184
|
-
<<: *ruby-3-0
|
|
185
|
-
<<: *rails-edge
|
|
186
|
-
<<: *build_steps
|
|
187
|
-
|
|
188
|
-
"ruby-3-1-rails-6-0":
|
|
189
|
-
<<: *ruby-3-1
|
|
190
|
-
<<: *rails-6-0
|
|
191
|
-
<<: *build_steps
|
|
192
|
-
"ruby-3-1-rails-6-1":
|
|
193
|
-
<<: *ruby-3-1
|
|
194
|
-
<<: *rails-6-1
|
|
195
|
-
<<: *build_steps
|
|
196
|
-
"ruby-3-1-rails-7-0":
|
|
197
|
-
<<: *ruby-3-1
|
|
198
|
-
<<: *rails-7-0
|
|
199
|
-
<<: *build_steps
|
|
200
|
-
"ruby-3-1-rails-edge":
|
|
201
|
-
<<: *ruby-3-1
|
|
202
|
-
<<: *rails-edge
|
|
203
|
-
<<: *build_steps
|
|
204
|
-
|
|
205
|
-
workflows:
|
|
206
|
-
version: 2
|
|
207
|
-
build:
|
|
208
|
-
jobs:
|
|
209
|
-
- "ruby-2-4-rails-4-2"
|
|
210
|
-
- "ruby-2-4-rails-5-1"
|
|
211
|
-
- "ruby-2-4-rails-5-2"
|
|
212
|
-
|
|
213
|
-
- "ruby-2-5-rails-5-0"
|
|
214
|
-
- "ruby-2-5-rails-5-1"
|
|
215
|
-
- "ruby-2-5-rails-5-2"
|
|
216
|
-
- "ruby-2-5-rails-6-0"
|
|
217
|
-
- "ruby-2-5-rails-6-1"
|
|
218
|
-
|
|
219
|
-
- "ruby-2-6-rails-5-0"
|
|
220
|
-
- "ruby-2-6-rails-5-1"
|
|
221
|
-
- "ruby-2-6-rails-5-2"
|
|
222
|
-
- "ruby-2-6-rails-6-0"
|
|
223
|
-
- "ruby-2-6-rails-6-1"
|
|
224
|
-
|
|
225
|
-
- "ruby-2-7-rails-5-0"
|
|
226
|
-
- "ruby-2-7-rails-5-1"
|
|
227
|
-
- "ruby-2-7-rails-5-2"
|
|
228
|
-
- "ruby-2-7-rails-6-0"
|
|
229
|
-
- "ruby-2-7-rails-6-1"
|
|
230
|
-
- "ruby-2-7-rails-7-0"
|
|
231
|
-
- "ruby-2-7-rails-edge"
|
|
232
|
-
|
|
233
|
-
- "ruby-3-0-rails-6-0"
|
|
234
|
-
- "ruby-3-0-rails-6-1"
|
|
235
|
-
- "ruby-3-0-rails-7-0"
|
|
236
|
-
- "ruby-3-0-rails-edge"
|
|
237
|
-
|
|
238
|
-
- "ruby-3-1-rails-6-0"
|
|
239
|
-
- "ruby-3-1-rails-6-1"
|
|
240
|
-
- "ruby-3-1-rails-7-0"
|
|
241
|
-
- "ruby-3-1-rails-edge"
|
data/.gitignore
DELETED
data/.rubocop.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age,
|
|
8
|
-
body size, disability, ethnicity, gender identity and expression, level of
|
|
9
|
-
experience, nationality, personal appearance, race, religion, or sexual
|
|
10
|
-
identity and orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
-
threatening, offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an
|
|
52
|
-
appointed representative at an online or offline event. Representation of a
|
|
53
|
-
project may be further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at kaihatsu@cookpad.com. All complaints
|
|
59
|
-
will be reviewed and investigated and will result in a response that is deemed
|
|
60
|
-
necessary and appropriate to the circumstances. The project team is obligated
|
|
61
|
-
to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
71
|
-
version 1.4, available at
|
|
72
|
-
[http://contributor-covenant.org/version/1/4][version]
|
|
73
|
-
|
|
74
|
-
[homepage]: http://contributor-covenant.org
|
|
75
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
source "https://rubygems.org"
|
|
2
|
-
|
|
3
|
-
# rubocop:disable Bundler/DuplicatedGem
|
|
4
|
-
if ENV["RAILS_VERSION"]
|
|
5
|
-
gem "rails", ENV["RAILS_VERSION"]
|
|
6
|
-
elsif ENV["RAILS_BRANCH"]
|
|
7
|
-
gem "rails", git: "https://github.com/rails/rails.git", branch: ENV["RAILS_BRANCH"]
|
|
8
|
-
end
|
|
9
|
-
# rubocop:enable Bundler/DuplicatedGem
|
|
10
|
-
|
|
11
|
-
gemspec
|
data/Rakefile
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
lib = File.expand_path("lib", __dir__)
|
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require "omniauth/rails_csrf_protection/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "omniauth-rails_csrf_protection"
|
|
7
|
-
spec.version = OmniAuth::RailsCsrfProtection::VERSION
|
|
8
|
-
spec.authors = ["Cookpad Inc."]
|
|
9
|
-
spec.email = ["kaihatsu@cookpad.com"]
|
|
10
|
-
|
|
11
|
-
spec.summary = <<~SUMMARY
|
|
12
|
-
Provides CSRF protection on OmniAuth request endpoint on Rails application.
|
|
13
|
-
SUMMARY
|
|
14
|
-
|
|
15
|
-
spec.description = <<~DESCRIPTION
|
|
16
|
-
This gem provides a mitigation against CVE-2015-9284 (Cross-Site Request
|
|
17
|
-
Forgery on the request phrase when using OmniAuth gem with a Ruby on Rails
|
|
18
|
-
application) by implementing a CSRF token verifier that directly utilize
|
|
19
|
-
`ActionController::RequestForgeryProtection` code from Rails.
|
|
20
|
-
DESCRIPTION
|
|
21
|
-
|
|
22
|
-
spec.homepage = "https://github.com/cookpad/omniauth-rails_csrf_protection"
|
|
23
|
-
spec.license = "MIT"
|
|
24
|
-
|
|
25
|
-
spec.files = `git ls-files`.split("\n")
|
|
26
|
-
spec.test_files = `git ls-files -- test/*`.split("\n")
|
|
27
|
-
|
|
28
|
-
spec.require_paths = ["lib"]
|
|
29
|
-
|
|
30
|
-
spec.add_dependency "actionpack", ">= 4.2"
|
|
31
|
-
spec.add_dependency "omniauth", "~> 2.0"
|
|
32
|
-
|
|
33
|
-
spec.add_development_dependency "bundler"
|
|
34
|
-
spec.add_development_dependency "minitest"
|
|
35
|
-
spec.add_development_dependency "rails"
|
|
36
|
-
spec.add_development_dependency "rake"
|
|
37
|
-
end
|