angular_rails_csrf 2.1.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d93762ebe8c4484575471e50ae7316781bc2cec9
4
- data.tar.gz: 84f0881fe1db08179afa56e6f1ec3839a6527408
2
+ SHA256:
3
+ metadata.gz: 46c071748a311ae8620db42c99aeebbb70e270c17153d33b0afe85cdd4ef6dcf
4
+ data.tar.gz: 7c99418f7d10eced3a505fdfef58d9a8762ba7b718b5ca08fb9380ed5accbb29
5
5
  SHA512:
6
- metadata.gz: 657223223e1c1deef539f651191a42718fd5f2dd5086b6ec5be2c876a912e0de6ba352f5740bbfe5166b79a320ac15bb843f21e0b7e276650d5dc4add1656225
7
- data.tar.gz: 55e928d9f0f4f5ba9e5b867ff245080ec8e026dc6b8ee7e8440e9efba00135561272984e4bccabd7b6be3b03484cc86935724397d64316d1a91fcd135e6b94e9
6
+ metadata.gz: 941d76219cfb18d18c07ba8f714600e112430155c261a6cdd2c25f6b10803fa8d0fbfcfa00c3bcfd9b5d30a34e6118991cf46d81353bcd0b45a6672a17ffcc38
7
+ data.tar.gz: bc619bd6466b724a21492ba7d0411159a9392143af7da19f24abf4968f1c78e48f05792d19cfdc6a89d4d1d13dba887af04d81cec21cf23dfea3546dea163dba
data/README.md CHANGED
@@ -10,7 +10,9 @@ This project adds direct support for this scheme to your Rails application witho
10
10
 
11
11
  Note that there is nothing AngularJS specific here, and this will work with any other front-end that implements the same scheme.
12
12
 
13
- ### Installation
13
+ *Version 3 supports only Rails 4+ and Ruby 2.3+. If you are still on Rails 3 (2, 1?!), you have to utilize version 2.1.1!*
14
+
15
+ ## Installation
14
16
 
15
17
  Add this line to your application's *Gemfile*:
16
18
 
@@ -22,6 +24,21 @@ And then execute:
22
24
 
23
25
  That's it!
24
26
 
27
+ ## Configuration
28
+ ### Cookie Domain
29
+
30
+ Starting from version 3, you may set domain for the XSRF cookie:
31
+
32
+ ```ruby
33
+ # application.rb
34
+ class Application < Rails::Application
35
+ #...
36
+ config.angular_rails_csrf_domain = :all
37
+ end
38
+ ```
39
+
40
+ If `angular_rails_csrf_domain` is not set, it defaults to `nil`.
41
+
25
42
  ### Exclusions
26
43
 
27
44
  Sometimes you will want to skip setting the XSRF token for certain controllers (for example, when using SSE or ActionCable, as discussed [here](https://github.com/jsanders/angular_rails_csrf/issues/7)):
@@ -34,6 +51,20 @@ class ExclusionsController < ApplicationController
34
51
  end
35
52
  ```
36
53
 
37
- ### License
54
+ ## Testing
55
+
56
+ Run
57
+
58
+ ```console
59
+ $ bundle install
60
+ ```
61
+
62
+ and then
63
+
64
+ ```console
65
+ $ rake test
66
+ ```
67
+
68
+ ## License
38
69
 
39
70
  Licensed under the [MIT License](https://github.com/jsanders/angular_rails_csrf/blob/master/LICENSE).
@@ -3,16 +3,14 @@ module AngularRailsCsrf
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
- if Rails::VERSION::MAJOR < 4
7
- after_filter :set_xsrf_token_cookie
8
- else
9
- after_action :set_xsrf_token_cookie
10
- end
6
+ after_action :set_xsrf_token_cookie
11
7
  end
12
8
 
13
9
  def set_xsrf_token_cookie
14
10
  if protect_against_forgery? && !respond_to?(:__exclude_xsrf_token_cookie?)
15
- cookies['XSRF-TOKEN'] = form_authenticity_token
11
+ config = Rails.application.config
12
+ domain = config.respond_to?(:angular_rails_csrf_domain) ? config.angular_rails_csrf_domain : nil
13
+ cookies['XSRF-TOKEN'] = { value: form_authenticity_token, domain: domain }
16
14
  end
17
15
  end
18
16
 
@@ -2,7 +2,7 @@ require 'angular_rails_csrf/concern'
2
2
 
3
3
  module AngularRailsCsrf
4
4
  class Railtie < ::Rails::Railtie
5
- initializer 'angular-rails-csrf' do |app|
5
+ initializer 'angular-rails-csrf' do |_app|
6
6
  ActiveSupport.on_load(:action_controller) do
7
7
  include AngularRailsCsrf::Concern
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module AngularRailsCsrf
2
- VERSION = "2.1.1"
2
+ VERSION = '3.0.0'.freeze
3
3
  end
@@ -29,13 +29,22 @@ class AngularRailsCsrfTest < ActionController::TestCase
29
29
  assert_response :success
30
30
  end
31
31
 
32
+ test "the domain is used if present" do
33
+ config = Rails.application.config
34
+ def config.angular_rails_csrf_domain; :all; end
35
+
36
+ get :index
37
+ assert @response.headers['Set-Cookie'].include?('.test.host')
38
+ assert_valid_cookie
39
+ assert_response :success
40
+ end
41
+
32
42
  private
33
43
 
34
44
  # Helpers
35
45
 
36
46
  def set_header_to(value)
37
- # Rails 3 uses `env` and Rails 4 uses `headers`
38
- @request.env['X-XSRF-TOKEN'] = @request.headers['X-XSRF-TOKEN'] = value
47
+ @request.headers['X-XSRF-TOKEN'] = value
39
48
  end
40
49
 
41
50
  def assert_valid_cookie
@@ -1,13 +1,6 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery with: :exception
3
3
 
4
- if Rails::VERSION::MAJOR < 4
5
- # Mimic `protect_from_forgery with: :exception` for older Rails versions.
6
- def handle_unverified_request
7
- raise ActionController::InvalidAuthenticityToken
8
- end
9
- end
10
-
11
4
  def index; head :ok; end
12
5
  def create; head :ok; end
13
6
  end
@@ -79,3 +79,297 @@ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
79
79
  ----------------------------------------------------------------------------
80
80
  Processing by ExclusionsController#index as HTML
81
81
  Completed 200 OK in 1ms
82
+ ----------------------------------------------------------------------------
83
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
84
+ ----------------------------------------------------------------------------
85
+ Processing by ExclusionsController#index as HTML
86
+ Completed 200 OK in 0ms
87
+ --------------------------------------------------------------------------------------------------------
88
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
89
+ --------------------------------------------------------------------------------------------------------
90
+ Processing by ApplicationController#index as HTML
91
+ Completed 200 OK in 0ms
92
+ -----------------------------------------------------------------------------------------------------
93
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
94
+ -----------------------------------------------------------------------------------------------------
95
+ Processing by ApplicationController#create as HTML
96
+ Can't verify CSRF token authenticity.
97
+ Completed 422 Unprocessable Entity in 1ms
98
+ -------------------------------------------------------------------------------------
99
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
100
+ -------------------------------------------------------------------------------------
101
+ Processing by ApplicationController#create as HTML
102
+ Can't verify CSRF token authenticity.
103
+ Completed 422 Unprocessable Entity in 0ms
104
+ -----------------------------------------------------------------------------
105
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
106
+ -----------------------------------------------------------------------------
107
+ Processing by ApplicationController#create as HTML
108
+ Completed 200 OK in 0ms
109
+ -----------------------------------------------------------------------------------------------------
110
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
111
+ -----------------------------------------------------------------------------------------------------
112
+ Processing by ApplicationController#create as HTML
113
+ Can't verify CSRF token authenticity.
114
+ Completed 422 Unprocessable Entity in 0ms
115
+ -----------------------------------------------------------------------------
116
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
117
+ -----------------------------------------------------------------------------
118
+ Processing by ApplicationController#create as HTML
119
+ Completed 200 OK in 1ms
120
+ -------------------------------------------------------------------------------------
121
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
122
+ -------------------------------------------------------------------------------------
123
+ Processing by ApplicationController#create as HTML
124
+ Can't verify CSRF token authenticity.
125
+ Completed 422 Unprocessable Entity in 1ms
126
+ --------------------------------------------------------------------------------------------------------
127
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
128
+ --------------------------------------------------------------------------------------------------------
129
+ Processing by ApplicationController#index as HTML
130
+ Completed 200 OK in 1ms
131
+ ----------------------------------------------------------------------------
132
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
133
+ ----------------------------------------------------------------------------
134
+ Processing by ExclusionsController#index as HTML
135
+ Completed 200 OK in 0ms
136
+ ----------------------------------------------------------------------------
137
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
138
+ ----------------------------------------------------------------------------
139
+ Processing by ExclusionsController#index as HTML
140
+ Completed 200 OK in 1ms
141
+ -----------------------------------------------------------------------------
142
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
143
+ -----------------------------------------------------------------------------
144
+ Processing by ApplicationController#create as HTML
145
+ Completed 200 OK in 0ms
146
+ --------------------------------------------------------------------------------------------------------
147
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
148
+ --------------------------------------------------------------------------------------------------------
149
+ Processing by ApplicationController#index as HTML
150
+ Completed 200 OK in 0ms
151
+ -------------------------------------------------------------------------------------
152
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
153
+ -------------------------------------------------------------------------------------
154
+ Processing by ApplicationController#create as HTML
155
+ Can't verify CSRF token authenticity.
156
+ Completed 422 Unprocessable Entity in 0ms
157
+ -----------------------------------------------------------------------------------------------------
158
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
159
+ -----------------------------------------------------------------------------------------------------
160
+ Processing by ApplicationController#create as HTML
161
+ Can't verify CSRF token authenticity.
162
+ Completed 422 Unprocessable Entity in 0ms
163
+ ----------------------------------------------------------------------------
164
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
165
+ ----------------------------------------------------------------------------
166
+ Processing by ExclusionsController#index as HTML
167
+ Completed 200 OK in 0ms
168
+ --------------------------------------------------------
169
+ AngularRailsCsrfTest: test_the_domain_is_used_if_present
170
+ --------------------------------------------------------
171
+ Processing by ApplicationController#index as HTML
172
+ Completed 200 OK in 0ms
173
+ --------------------------------------------------------------------------------------------------------
174
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
175
+ --------------------------------------------------------------------------------------------------------
176
+ Processing by ApplicationController#index as HTML
177
+ Completed 200 OK in 0ms
178
+ -----------------------------------------------------------------------------------------------------
179
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
180
+ -----------------------------------------------------------------------------------------------------
181
+ Processing by ApplicationController#create as HTML
182
+ Can't verify CSRF token authenticity.
183
+ Completed 422 Unprocessable Entity in 1ms
184
+ -------------------------------------------------------------------------------------
185
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
186
+ -------------------------------------------------------------------------------------
187
+ Processing by ApplicationController#create as HTML
188
+ Can't verify CSRF token authenticity.
189
+ Completed 422 Unprocessable Entity in 0ms
190
+ -----------------------------------------------------------------------------
191
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
192
+ -----------------------------------------------------------------------------
193
+ Processing by ApplicationController#create as HTML
194
+ Completed 200 OK in 0ms
195
+ -------------------------------------------------------------------------------------
196
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
197
+ -------------------------------------------------------------------------------------
198
+ Processing by ApplicationController#create as HTML
199
+ Can't verify CSRF token authenticity.
200
+ Completed 422 Unprocessable Entity in 1ms
201
+ -----------------------------------------------------------------------------------------------------
202
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
203
+ -----------------------------------------------------------------------------------------------------
204
+ Processing by ApplicationController#create as HTML
205
+ Can't verify CSRF token authenticity.
206
+ Completed 422 Unprocessable Entity in 1ms
207
+ -----------------------------------------------------------------------------
208
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
209
+ -----------------------------------------------------------------------------
210
+ Processing by ApplicationController#create as HTML
211
+ Completed 200 OK in 0ms
212
+ --------------------------------------------------------------------------------------------------------
213
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
214
+ --------------------------------------------------------------------------------------------------------
215
+ Processing by ApplicationController#index as HTML
216
+ Completed 200 OK in 0ms
217
+ -----------------------------------------------------------------------------
218
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
219
+ -----------------------------------------------------------------------------
220
+ Processing by ApplicationController#create as HTML
221
+ -----------------------------------------------------------------------------
222
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
223
+ -----------------------------------------------------------------------------
224
+ Processing by ApplicationController#create as HTML
225
+ Completed 200 OK in 1ms
226
+ -----------------------------------------------------------------------------------------------------
227
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
228
+ -----------------------------------------------------------------------------------------------------
229
+ Processing by ApplicationController#create as HTML
230
+ Can't verify CSRF token authenticity.
231
+ Completed 422 Unprocessable Entity in 1ms
232
+ -------------------------------------------------------------------------------------
233
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
234
+ -------------------------------------------------------------------------------------
235
+ Processing by ApplicationController#create as HTML
236
+ Can't verify CSRF token authenticity.
237
+ Completed 422 Unprocessable Entity in 0ms
238
+ --------------------------------------------------------
239
+ AngularRailsCsrfTest: test_the_domain_is_used_if_present
240
+ --------------------------------------------------------
241
+ Processing by ApplicationController#index as HTML
242
+ Completed 200 OK in 0ms
243
+ --------------------------------------------------------------------------------------------------------
244
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
245
+ --------------------------------------------------------------------------------------------------------
246
+ Processing by ApplicationController#index as HTML
247
+ Completed 200 OK in 0ms
248
+ ----------------------------------------------------------------------------
249
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
250
+ ----------------------------------------------------------------------------
251
+ Processing by ExclusionsController#index as HTML
252
+ Completed 200 OK in 0ms
253
+ ----------------------------------------------------------------------------
254
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
255
+ ----------------------------------------------------------------------------
256
+ Processing by ExclusionsController#index as HTML
257
+ Completed 200 OK in 0ms
258
+ -----------------------------------------------------------------------------------------------------
259
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
260
+ -----------------------------------------------------------------------------------------------------
261
+ Processing by ApplicationController#create as HTML
262
+ Can't verify CSRF token authenticity.
263
+ Completed 422 Unprocessable Entity in 1ms
264
+ -----------------------------------------------------------------------------
265
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
266
+ -----------------------------------------------------------------------------
267
+ Processing by ApplicationController#create as HTML
268
+ Completed 200 OK in 1ms
269
+ -------------------------------------------------------------------------------------
270
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
271
+ -------------------------------------------------------------------------------------
272
+ Processing by ApplicationController#create as HTML
273
+ Can't verify CSRF token authenticity.
274
+ Completed 422 Unprocessable Entity in 1ms
275
+ --------------------------------------------------------
276
+ AngularRailsCsrfTest: test_the_domain_is_used_if_present
277
+ --------------------------------------------------------
278
+ Processing by ApplicationController#index as HTML
279
+ Completed 200 OK in 1ms
280
+ --------------------------------------------------------------------------------------------------------
281
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
282
+ --------------------------------------------------------------------------------------------------------
283
+ Processing by ApplicationController#index as HTML
284
+ Completed 200 OK in 1ms
285
+ ----------------------------------------------------------------------------
286
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
287
+ ----------------------------------------------------------------------------
288
+ Processing by ExclusionsController#index as HTML
289
+ Completed 200 OK in 1ms
290
+ --------------------------------------------------------
291
+ AngularRailsCsrfTest: test_the_domain_is_used_if_present
292
+ --------------------------------------------------------
293
+ Processing by ApplicationController#index as HTML
294
+ Completed 200 OK in 0ms
295
+ -------------------------------------------------------------------------------------
296
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
297
+ -------------------------------------------------------------------------------------
298
+ Processing by ApplicationController#create as HTML
299
+ Can't verify CSRF token authenticity.
300
+ Completed 422 Unprocessable Entity in 1ms
301
+ -----------------------------------------------------------------------------
302
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
303
+ -----------------------------------------------------------------------------
304
+ Processing by ApplicationController#create as HTML
305
+ Completed 200 OK in 0ms
306
+ --------------------------------------------------------------------------------------------------------
307
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
308
+ --------------------------------------------------------------------------------------------------------
309
+ Processing by ApplicationController#index as HTML
310
+ Completed 200 OK in 0ms
311
+ -----------------------------------------------------------------------------------------------------
312
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
313
+ -----------------------------------------------------------------------------------------------------
314
+ Processing by ApplicationController#create as HTML
315
+ Can't verify CSRF token authenticity.
316
+ Completed 422 Unprocessable Entity in 0ms
317
+ ----------------------------------------------------------------------------
318
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
319
+ ----------------------------------------------------------------------------
320
+ Processing by ExclusionsController#index as HTML
321
+ Completed 200 OK in 0ms
322
+ -------------------------------------------------------------------------------------
323
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
324
+ -------------------------------------------------------------------------------------
325
+ Processing by ApplicationController#create as HTML
326
+ Can't verify CSRF token authenticity.
327
+ Completed 422 Unprocessable Entity in 1ms
328
+ --------------------------------------------------------------------------------------------------------
329
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
330
+ --------------------------------------------------------------------------------------------------------
331
+ Processing by ApplicationController#index as HTML
332
+ Completed 200 OK in 1ms
333
+ -----------------------------------------------------------------------------------------------------
334
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
335
+ -----------------------------------------------------------------------------------------------------
336
+ Processing by ApplicationController#create as HTML
337
+ Can't verify CSRF token authenticity.
338
+ Completed 422 Unprocessable Entity in 0ms
339
+ --------------------------------------------------------
340
+ AngularRailsCsrfTest: test_the_domain_is_used_if_present
341
+ --------------------------------------------------------
342
+ Processing by ApplicationController#index as HTML
343
+ Completed 200 OK in 0ms
344
+ --------------------------------------------------------
345
+ AngularRailsCsrfTest: test_the_domain_is_used_if_present
346
+ --------------------------------------------------------
347
+ Processing by ApplicationController#index as HTML
348
+ Completed 200 OK in 1ms
349
+ --------------------------------------------------------------------------------------------------------
350
+ AngularRailsCsrfTest: test_a_get_sets_the_XSRF-TOKEN_cookie_but_does_not_require_the_X-XSRF-TOKEN_header
351
+ --------------------------------------------------------------------------------------------------------
352
+ Processing by ApplicationController#index as HTML
353
+ Completed 200 OK in 0ms
354
+ -----------------------------------------------------------------------------
355
+ AngularRailsCsrfTest: test_a_post_is_accepted_if_X-XSRF-TOKEN_is_set_properly
356
+ -----------------------------------------------------------------------------
357
+ Processing by ApplicationController#create as HTML
358
+ Completed 200 OK in 0ms
359
+ -------------------------------------------------------------------------------------
360
+ AngularRailsCsrfTest: test_a_post_raises_an_error_without_the_X-XSRF-TOKEN_header_set
361
+ -------------------------------------------------------------------------------------
362
+ Processing by ApplicationController#create as HTML
363
+ Can't verify CSRF token authenticity.
364
+ Completed 422 Unprocessable Entity in 1ms
365
+ -----------------------------------------------------------------------------------------------------
366
+ AngularRailsCsrfTest: test_a_post_raises_an_error_with_the_X-XSRF-TOKEN_header_set_to_the_wrong_value
367
+ -----------------------------------------------------------------------------------------------------
368
+ Processing by ApplicationController#create as HTML
369
+ Can't verify CSRF token authenticity.
370
+ Completed 422 Unprocessable Entity in 0ms
371
+ ----------------------------------------------------------------------------
372
+ AngularRailsCsrfExceptionTest: test_a_get_does_not_set_the_XSRF-TOKEN_cookie
373
+ ----------------------------------------------------------------------------
374
+ Processing by ExclusionsController#index as HTML
375
+ Completed 200 OK in 0ms
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angular_rails_csrf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Sanders
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-15 00:00:00.000000000 Z
12
+ date: 2018-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 5.1.1
48
+ version: 5.1.4
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 5.1.1
55
+ version: 5.1.4
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: railties
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  requirements: []
120
120
  rubyforge_project:
121
- rubygems_version: 2.6.12
121
+ rubygems_version: 2.7.4
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Support for AngularJS $http service style CSRF protection in Rails