doorkeeper 4.4.3 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of doorkeeper might be problematic. Click here for more details.

Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.gitlab-ci.yml +16 -0
  4. data/.travis.yml +2 -0
  5. data/Appraisals +2 -2
  6. data/Gemfile +1 -1
  7. data/NEWS.md +61 -8
  8. data/README.md +92 -9
  9. data/Rakefile +6 -0
  10. data/UPGRADE.md +2 -0
  11. data/app/assets/stylesheets/doorkeeper/admin/application.css +2 -2
  12. data/app/controllers/doorkeeper/application_controller.rb +4 -3
  13. data/app/controllers/doorkeeper/application_metal_controller.rb +4 -0
  14. data/app/controllers/doorkeeper/applications_controller.rb +42 -22
  15. data/app/controllers/doorkeeper/authorizations_controller.rb +55 -12
  16. data/app/controllers/doorkeeper/authorized_applications_controller.rb +19 -2
  17. data/app/controllers/doorkeeper/tokens_controller.rb +2 -6
  18. data/app/helpers/doorkeeper/dashboard_helper.rb +7 -7
  19. data/app/validators/redirect_uri_validator.rb +3 -2
  20. data/app/views/doorkeeper/applications/_delete_form.html.erb +3 -1
  21. data/app/views/doorkeeper/applications/_form.html.erb +25 -24
  22. data/app/views/doorkeeper/applications/edit.html.erb +1 -1
  23. data/app/views/doorkeeper/applications/index.html.erb +17 -7
  24. data/app/views/doorkeeper/applications/new.html.erb +1 -1
  25. data/app/views/doorkeeper/applications/show.html.erb +6 -6
  26. data/app/views/doorkeeper/authorizations/error.html.erb +1 -1
  27. data/app/views/doorkeeper/authorizations/new.html.erb +4 -0
  28. data/app/views/layouts/doorkeeper/admin.html.erb +15 -15
  29. data/config/locales/en.yml +10 -1
  30. data/doorkeeper.gemspec +18 -20
  31. data/gemfiles/rails_5_2.gemfile +1 -1
  32. data/gemfiles/rails_master.gemfile +4 -1
  33. data/lib/doorkeeper/config.rb +75 -39
  34. data/lib/doorkeeper/engine.rb +4 -0
  35. data/lib/doorkeeper/errors.rb +2 -5
  36. data/lib/doorkeeper/grape/helpers.rb +1 -1
  37. data/lib/doorkeeper/helpers/controller.rb +7 -2
  38. data/lib/doorkeeper/models/access_grant_mixin.rb +71 -0
  39. data/lib/doorkeeper/models/access_token_mixin.rb +39 -22
  40. data/lib/doorkeeper/models/concerns/scopes.rb +1 -1
  41. data/lib/doorkeeper/oauth/authorization/code.rb +31 -8
  42. data/lib/doorkeeper/oauth/authorization/context.rb +15 -0
  43. data/lib/doorkeeper/oauth/authorization/token.rb +36 -14
  44. data/lib/doorkeeper/oauth/authorization_code_request.rb +27 -2
  45. data/lib/doorkeeper/oauth/base_request.rb +20 -9
  46. data/lib/doorkeeper/oauth/client/credentials.rb +1 -1
  47. data/lib/doorkeeper/oauth/client.rb +0 -2
  48. data/lib/doorkeeper/oauth/client_credentials/creator.rb +2 -1
  49. data/lib/doorkeeper/oauth/client_credentials/issuer.rb +6 -3
  50. data/lib/doorkeeper/oauth/client_credentials/validation.rb +4 -6
  51. data/lib/doorkeeper/oauth/client_credentials_request.rb +0 -4
  52. data/lib/doorkeeper/oauth/error_response.rb +11 -3
  53. data/lib/doorkeeper/oauth/helpers/scope_checker.rb +0 -8
  54. data/lib/doorkeeper/oauth/password_access_token_request.rb +7 -4
  55. data/lib/doorkeeper/oauth/pre_authorization.rb +41 -11
  56. data/lib/doorkeeper/oauth/refresh_token_request.rb +6 -1
  57. data/lib/doorkeeper/oauth/scopes.rb +1 -1
  58. data/lib/doorkeeper/oauth/token.rb +5 -2
  59. data/lib/doorkeeper/oauth/token_introspection.rb +2 -2
  60. data/lib/doorkeeper/oauth/token_response.rb +4 -2
  61. data/lib/doorkeeper/oauth.rb +13 -0
  62. data/lib/doorkeeper/orm/active_record/application.rb +22 -14
  63. data/lib/doorkeeper/orm/active_record/stale_records_cleaner.rb +26 -0
  64. data/lib/doorkeeper/orm/active_record.rb +2 -0
  65. data/lib/doorkeeper/rails/helpers.rb +2 -4
  66. data/lib/doorkeeper/rails/routes.rb +14 -6
  67. data/lib/doorkeeper/rake/db.rake +40 -0
  68. data/lib/doorkeeper/rake/setup.rake +6 -0
  69. data/lib/doorkeeper/rake.rb +14 -0
  70. data/lib/doorkeeper/request/authorization_code.rb +0 -2
  71. data/lib/doorkeeper/request/client_credentials.rb +0 -2
  72. data/lib/doorkeeper/request/code.rb +0 -2
  73. data/lib/doorkeeper/request/password.rb +0 -2
  74. data/lib/doorkeeper/request/refresh_token.rb +0 -2
  75. data/lib/doorkeeper/request/token.rb +0 -2
  76. data/lib/doorkeeper/request.rb +28 -35
  77. data/lib/doorkeeper/version.rb +5 -25
  78. data/lib/doorkeeper.rb +19 -17
  79. data/lib/generators/doorkeeper/application_owner_generator.rb +23 -18
  80. data/lib/generators/doorkeeper/confidential_applications_generator.rb +32 -0
  81. data/lib/generators/doorkeeper/install_generator.rb +17 -9
  82. data/lib/generators/doorkeeper/migration_generator.rb +23 -18
  83. data/lib/generators/doorkeeper/pkce_generator.rb +32 -0
  84. data/lib/generators/doorkeeper/previous_refresh_token_generator.rb +29 -24
  85. data/lib/generators/doorkeeper/templates/add_confidential_to_applications.rb.erb +13 -0
  86. data/lib/generators/doorkeeper/templates/enable_pkce_migration.rb.erb +6 -0
  87. data/lib/generators/doorkeeper/templates/initializer.rb +76 -11
  88. data/lib/generators/doorkeeper/views_generator.rb +3 -1
  89. data/spec/controllers/application_metal_controller_spec.rb +50 -0
  90. data/spec/controllers/applications_controller_spec.rb +126 -13
  91. data/spec/controllers/authorizations_controller_spec.rb +277 -47
  92. data/spec/controllers/protected_resources_controller_spec.rb +16 -16
  93. data/spec/controllers/token_info_controller_spec.rb +4 -12
  94. data/spec/controllers/tokens_controller_spec.rb +13 -15
  95. data/spec/dummy/app/assets/config/manifest.js +2 -0
  96. data/spec/dummy/config/environments/test.rb +4 -5
  97. data/spec/dummy/config/initializers/doorkeeper.rb +10 -5
  98. data/spec/dummy/config/initializers/new_framework_defaults.rb +4 -0
  99. data/spec/dummy/config/routes.rb +3 -42
  100. data/spec/dummy/db/migrate/20170822064514_enable_pkce.rb +6 -0
  101. data/spec/dummy/db/migrate/{20180210183654_add_confidential_to_application.rb → 20180210183654_add_confidential_to_applications.rb} +1 -1
  102. data/spec/dummy/db/schema.rb +36 -36
  103. data/spec/generators/application_owner_generator_spec.rb +1 -1
  104. data/spec/generators/confidential_applications_generator_spec.rb +45 -0
  105. data/spec/generators/install_generator_spec.rb +1 -1
  106. data/spec/generators/migration_generator_spec.rb +1 -1
  107. data/spec/generators/pkce_generator_spec.rb +43 -0
  108. data/spec/generators/previous_refresh_token_generator_spec.rb +1 -1
  109. data/spec/generators/views_generator_spec.rb +1 -1
  110. data/spec/grape/grape_integration_spec.rb +1 -1
  111. data/spec/helpers/doorkeeper/dashboard_helper_spec.rb +1 -1
  112. data/spec/lib/config_spec.rb +80 -31
  113. data/spec/lib/doorkeeper_spec.rb +1 -126
  114. data/spec/lib/models/expirable_spec.rb +0 -3
  115. data/spec/lib/models/revocable_spec.rb +0 -2
  116. data/spec/lib/models/scopes_spec.rb +0 -4
  117. data/spec/lib/oauth/authorization/uri_builder_spec.rb +0 -4
  118. data/spec/lib/oauth/authorization_code_request_spec.rb +9 -2
  119. data/spec/lib/oauth/base_request_spec.rb +40 -2
  120. data/spec/lib/oauth/base_response_spec.rb +1 -1
  121. data/spec/lib/oauth/client/credentials_spec.rb +1 -3
  122. data/spec/lib/oauth/client_credentials/creator_spec.rb +5 -1
  123. data/spec/lib/oauth/client_credentials/issuer_spec.rb +26 -7
  124. data/spec/lib/oauth/client_credentials/validation_spec.rb +2 -3
  125. data/spec/lib/oauth/client_credentials_integration_spec.rb +1 -1
  126. data/spec/lib/oauth/client_credentials_request_spec.rb +3 -5
  127. data/spec/lib/oauth/client_spec.rb +0 -3
  128. data/spec/lib/oauth/code_request_spec.rb +4 -2
  129. data/spec/lib/oauth/error_response_spec.rb +0 -3
  130. data/spec/lib/oauth/error_spec.rb +0 -2
  131. data/spec/lib/oauth/forbidden_token_response_spec.rb +1 -4
  132. data/spec/lib/oauth/helpers/scope_checker_spec.rb +0 -3
  133. data/spec/lib/oauth/helpers/unique_token_spec.rb +0 -1
  134. data/spec/lib/oauth/helpers/uri_checker_spec.rb +5 -7
  135. data/spec/lib/oauth/invalid_token_response_spec.rb +1 -4
  136. data/spec/lib/oauth/password_access_token_request_spec.rb +37 -2
  137. data/spec/lib/oauth/pre_authorization_spec.rb +33 -4
  138. data/spec/lib/oauth/refresh_token_request_spec.rb +11 -7
  139. data/spec/lib/oauth/scopes_spec.rb +0 -3
  140. data/spec/lib/oauth/token_request_spec.rb +4 -5
  141. data/spec/lib/oauth/token_response_spec.rb +0 -1
  142. data/spec/lib/oauth/token_spec.rb +37 -14
  143. data/spec/lib/orm/active_record/stale_records_cleaner_spec.rb +79 -0
  144. data/spec/lib/request/strategy_spec.rb +0 -1
  145. data/spec/lib/server_spec.rb +1 -1
  146. data/spec/models/doorkeeper/access_grant_spec.rb +44 -1
  147. data/spec/models/doorkeeper/access_token_spec.rb +66 -22
  148. data/spec/models/doorkeeper/application_spec.rb +14 -47
  149. data/spec/requests/applications/applications_request_spec.rb +134 -1
  150. data/spec/requests/applications/authorized_applications_spec.rb +1 -1
  151. data/spec/requests/endpoints/authorization_spec.rb +1 -1
  152. data/spec/requests/endpoints/token_spec.rb +7 -5
  153. data/spec/requests/flows/authorization_code_errors_spec.rb +1 -1
  154. data/spec/requests/flows/authorization_code_spec.rb +197 -1
  155. data/spec/requests/flows/client_credentials_spec.rb +46 -6
  156. data/spec/requests/flows/implicit_grant_errors_spec.rb +1 -1
  157. data/spec/requests/flows/implicit_grant_spec.rb +38 -11
  158. data/spec/requests/flows/password_spec.rb +56 -2
  159. data/spec/requests/flows/refresh_token_spec.rb +2 -2
  160. data/spec/requests/flows/revoke_token_spec.rb +11 -11
  161. data/spec/requests/flows/skip_authorization_spec.rb +16 -11
  162. data/spec/requests/protected_resources/metal_spec.rb +1 -1
  163. data/spec/requests/protected_resources/private_api_spec.rb +1 -1
  164. data/spec/routing/custom_controller_routes_spec.rb +59 -7
  165. data/spec/routing/default_routes_spec.rb +2 -2
  166. data/spec/routing/scoped_routes_spec.rb +16 -2
  167. data/spec/spec_helper.rb +54 -3
  168. data/spec/spec_helper_integration.rb +2 -74
  169. data/spec/support/dependencies/{factory_girl.rb → factory_bot.rb} +0 -0
  170. data/spec/support/doorkeeper_rspec.rb +19 -0
  171. data/spec/support/helpers/authorization_request_helper.rb +4 -4
  172. data/spec/support/helpers/request_spec_helper.rb +10 -2
  173. data/spec/support/helpers/url_helper.rb +7 -3
  174. data/spec/support/http_method_shim.rb +12 -16
  175. data/spec/validators/redirect_uri_validator_spec.rb +7 -1
  176. data/spec/version/version_spec.rb +3 -3
  177. data/vendor/assets/stylesheets/doorkeeper/bootstrap.min.css +4 -5
  178. metadata +37 -33
  179. data/lib/generators/doorkeeper/add_client_confidentiality_generator.rb +0 -31
  180. data/lib/generators/doorkeeper/templates/add_confidential_to_application_migration.rb.erb +0 -11
  181. data/spec/controllers/application_metal_controller.rb +0 -10
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doorkeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.3
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Elias Philipp
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-09-19 00:00:00.000000000 Z
14
+ date: 2018-08-24 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -31,16 +31,16 @@ dependencies:
31
31
  name: capybara
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ">="
34
+ - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: '0'
36
+ version: '2.18'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ">="
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: '2.18'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: coveralls
46
46
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +150,7 @@ files:
150
150
  - ".github/ISSUE_TEMPLATE.md"
151
151
  - ".github/PULL_REQUEST_TEMPLATE.md"
152
152
  - ".gitignore"
153
+ - ".gitlab-ci.yml"
153
154
  - ".hound.yml"
154
155
  - ".rspec"
155
156
  - ".rubocop.yml"
@@ -164,6 +165,7 @@ files:
164
165
  - RELEASING.md
165
166
  - Rakefile
166
167
  - SECURITY.md
168
+ - UPGRADE.md
167
169
  - app/assets/stylesheets/doorkeeper/admin/application.css
168
170
  - app/assets/stylesheets/doorkeeper/application.css
169
171
  - app/controllers/doorkeeper/application_controller.rb
@@ -211,7 +213,9 @@ files:
211
213
  - lib/doorkeeper/models/concerns/ownership.rb
212
214
  - lib/doorkeeper/models/concerns/revocable.rb
213
215
  - lib/doorkeeper/models/concerns/scopes.rb
216
+ - lib/doorkeeper/oauth.rb
214
217
  - lib/doorkeeper/oauth/authorization/code.rb
218
+ - lib/doorkeeper/oauth/authorization/context.rb
215
219
  - lib/doorkeeper/oauth/authorization/token.rb
216
220
  - lib/doorkeeper/oauth/authorization/uri_builder.rb
217
221
  - lib/doorkeeper/oauth/authorization_code_request.rb
@@ -244,10 +248,14 @@ files:
244
248
  - lib/doorkeeper/orm/active_record/access_grant.rb
245
249
  - lib/doorkeeper/orm/active_record/access_token.rb
246
250
  - lib/doorkeeper/orm/active_record/application.rb
251
+ - lib/doorkeeper/orm/active_record/stale_records_cleaner.rb
247
252
  - lib/doorkeeper/rails/helpers.rb
248
253
  - lib/doorkeeper/rails/routes.rb
249
254
  - lib/doorkeeper/rails/routes/mapper.rb
250
255
  - lib/doorkeeper/rails/routes/mapping.rb
256
+ - lib/doorkeeper/rake.rb
257
+ - lib/doorkeeper/rake/db.rake
258
+ - lib/doorkeeper/rake/setup.rake
251
259
  - lib/doorkeeper/request.rb
252
260
  - lib/doorkeeper/request/authorization_code.rb
253
261
  - lib/doorkeeper/request/client_credentials.rb
@@ -259,25 +267,28 @@ files:
259
267
  - lib/doorkeeper/server.rb
260
268
  - lib/doorkeeper/validations.rb
261
269
  - lib/doorkeeper/version.rb
262
- - lib/generators/doorkeeper/add_client_confidentiality_generator.rb
263
270
  - lib/generators/doorkeeper/application_owner_generator.rb
271
+ - lib/generators/doorkeeper/confidential_applications_generator.rb
264
272
  - lib/generators/doorkeeper/install_generator.rb
265
273
  - lib/generators/doorkeeper/migration_generator.rb
274
+ - lib/generators/doorkeeper/pkce_generator.rb
266
275
  - lib/generators/doorkeeper/previous_refresh_token_generator.rb
267
276
  - lib/generators/doorkeeper/templates/README
268
- - lib/generators/doorkeeper/templates/add_confidential_to_application_migration.rb.erb
277
+ - lib/generators/doorkeeper/templates/add_confidential_to_applications.rb.erb
269
278
  - lib/generators/doorkeeper/templates/add_owner_to_application_migration.rb.erb
270
279
  - lib/generators/doorkeeper/templates/add_previous_refresh_token_to_access_tokens.rb.erb
280
+ - lib/generators/doorkeeper/templates/enable_pkce_migration.rb.erb
271
281
  - lib/generators/doorkeeper/templates/initializer.rb
272
282
  - lib/generators/doorkeeper/templates/migration.rb.erb
273
283
  - lib/generators/doorkeeper/views_generator.rb
274
- - spec/controllers/application_metal_controller.rb
284
+ - spec/controllers/application_metal_controller_spec.rb
275
285
  - spec/controllers/applications_controller_spec.rb
276
286
  - spec/controllers/authorizations_controller_spec.rb
277
287
  - spec/controllers/protected_resources_controller_spec.rb
278
288
  - spec/controllers/token_info_controller_spec.rb
279
289
  - spec/controllers/tokens_controller_spec.rb
280
290
  - spec/dummy/Rakefile
291
+ - spec/dummy/app/assets/config/manifest.js
281
292
  - spec/dummy/app/controllers/application_controller.rb
282
293
  - spec/dummy/app/controllers/custom_authorizations_controller.rb
283
294
  - spec/dummy/app/controllers/full_protected_resources_controller.rb
@@ -309,7 +320,8 @@ files:
309
320
  - spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb
310
321
  - spec/dummy/db/migrate/20151223200000_add_owner_to_application.rb
311
322
  - spec/dummy/db/migrate/20160320211015_add_previous_refresh_token_to_access_tokens.rb
312
- - spec/dummy/db/migrate/20180210183654_add_confidential_to_application.rb
323
+ - spec/dummy/db/migrate/20170822064514_enable_pkce.rb
324
+ - spec/dummy/db/migrate/20180210183654_add_confidential_to_applications.rb
313
325
  - spec/dummy/db/schema.rb
314
326
  - spec/dummy/public/404.html
315
327
  - spec/dummy/public/422.html
@@ -318,8 +330,10 @@ files:
318
330
  - spec/dummy/script/rails
319
331
  - spec/factories.rb
320
332
  - spec/generators/application_owner_generator_spec.rb
333
+ - spec/generators/confidential_applications_generator_spec.rb
321
334
  - spec/generators/install_generator_spec.rb
322
335
  - spec/generators/migration_generator_spec.rb
336
+ - spec/generators/pkce_generator_spec.rb
323
337
  - spec/generators/previous_refresh_token_generator_spec.rb
324
338
  - spec/generators/templates/routes.rb
325
339
  - spec/generators/views_generator_spec.rb
@@ -357,6 +371,7 @@ files:
357
371
  - spec/lib/oauth/token_request_spec.rb
358
372
  - spec/lib/oauth/token_response_spec.rb
359
373
  - spec/lib/oauth/token_spec.rb
374
+ - spec/lib/orm/active_record/stale_records_cleaner_spec.rb
360
375
  - spec/lib/request/strategy_spec.rb
361
376
  - spec/lib/server_spec.rb
362
377
  - spec/models/doorkeeper/access_grant_spec.rb
@@ -382,7 +397,8 @@ files:
382
397
  - spec/routing/scoped_routes_spec.rb
383
398
  - spec/spec_helper.rb
384
399
  - spec/spec_helper_integration.rb
385
- - spec/support/dependencies/factory_girl.rb
400
+ - spec/support/dependencies/factory_bot.rb
401
+ - spec/support/doorkeeper_rspec.rb
386
402
  - spec/support/helpers/access_token_request_helper.rb
387
403
  - spec/support/helpers/authorization_request_helper.rb
388
404
  - spec/support/helpers/config_helper.rb
@@ -400,25 +416,7 @@ homepage: https://github.com/doorkeeper-gem/doorkeeper
400
416
  licenses:
401
417
  - MIT
402
418
  metadata: {}
403
- post_install_message: |2+
404
-
405
-
406
- WARNING: This is a security release that addresses token revocation not working for public apps (CVE-2018-1000211)
407
-
408
- There is no breaking change in this release, however to take advantage of the security fix you must:
409
-
410
- 1. Run `rails generate doorkeeper:add_client_confidentiality` for the migration
411
- 2. Review your OAuth apps and determine which ones exclusively use public grant flows (eg implicit)
412
- 3. Update their `confidential` column to `false` for those public apps
413
-
414
- This is a backported security release.
415
-
416
- For more information:
417
-
418
- * https://github.com/doorkeeper-gem/doorkeeper/pull/1119
419
- * https://github.com/doorkeeper-gem/doorkeeper/issues/891
420
-
421
-
419
+ post_install_message:
422
420
  rdoc_options: []
423
421
  require_paths:
424
422
  - lib
@@ -439,13 +437,14 @@ signing_key:
439
437
  specification_version: 4
440
438
  summary: OAuth 2 provider for Rails and Grape
441
439
  test_files:
442
- - spec/controllers/application_metal_controller.rb
440
+ - spec/controllers/application_metal_controller_spec.rb
443
441
  - spec/controllers/applications_controller_spec.rb
444
442
  - spec/controllers/authorizations_controller_spec.rb
445
443
  - spec/controllers/protected_resources_controller_spec.rb
446
444
  - spec/controllers/token_info_controller_spec.rb
447
445
  - spec/controllers/tokens_controller_spec.rb
448
446
  - spec/dummy/Rakefile
447
+ - spec/dummy/app/assets/config/manifest.js
449
448
  - spec/dummy/app/controllers/application_controller.rb
450
449
  - spec/dummy/app/controllers/custom_authorizations_controller.rb
451
450
  - spec/dummy/app/controllers/full_protected_resources_controller.rb
@@ -477,7 +476,8 @@ test_files:
477
476
  - spec/dummy/db/migrate/20151223192035_create_doorkeeper_tables.rb
478
477
  - spec/dummy/db/migrate/20151223200000_add_owner_to_application.rb
479
478
  - spec/dummy/db/migrate/20160320211015_add_previous_refresh_token_to_access_tokens.rb
480
- - spec/dummy/db/migrate/20180210183654_add_confidential_to_application.rb
479
+ - spec/dummy/db/migrate/20170822064514_enable_pkce.rb
480
+ - spec/dummy/db/migrate/20180210183654_add_confidential_to_applications.rb
481
481
  - spec/dummy/db/schema.rb
482
482
  - spec/dummy/public/404.html
483
483
  - spec/dummy/public/422.html
@@ -486,8 +486,10 @@ test_files:
486
486
  - spec/dummy/script/rails
487
487
  - spec/factories.rb
488
488
  - spec/generators/application_owner_generator_spec.rb
489
+ - spec/generators/confidential_applications_generator_spec.rb
489
490
  - spec/generators/install_generator_spec.rb
490
491
  - spec/generators/migration_generator_spec.rb
492
+ - spec/generators/pkce_generator_spec.rb
491
493
  - spec/generators/previous_refresh_token_generator_spec.rb
492
494
  - spec/generators/templates/routes.rb
493
495
  - spec/generators/views_generator_spec.rb
@@ -525,6 +527,7 @@ test_files:
525
527
  - spec/lib/oauth/token_request_spec.rb
526
528
  - spec/lib/oauth/token_response_spec.rb
527
529
  - spec/lib/oauth/token_spec.rb
530
+ - spec/lib/orm/active_record/stale_records_cleaner_spec.rb
528
531
  - spec/lib/request/strategy_spec.rb
529
532
  - spec/lib/server_spec.rb
530
533
  - spec/models/doorkeeper/access_grant_spec.rb
@@ -550,7 +553,8 @@ test_files:
550
553
  - spec/routing/scoped_routes_spec.rb
551
554
  - spec/spec_helper.rb
552
555
  - spec/spec_helper_integration.rb
553
- - spec/support/dependencies/factory_girl.rb
556
+ - spec/support/dependencies/factory_bot.rb
557
+ - spec/support/doorkeeper_rspec.rb
554
558
  - spec/support/helpers/access_token_request_helper.rb
555
559
  - spec/support/helpers/authorization_request_helper.rb
556
560
  - spec/support/helpers/config_helper.rb
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rails/generators/active_record'
4
-
5
- module Doorkeeper
6
- class AddClientConfidentialityGenerator < ::Rails::Generators::Base
7
- include ::Rails::Generators::Migration
8
- source_root File.expand_path('templates', __dir__)
9
- desc 'Adds a migration to fix CVE-2018-1000211.'
10
-
11
- def install
12
- migration_template(
13
- 'add_confidential_to_application_migration.rb.erb',
14
- 'db/migrate/add_confidential_to_doorkeeper_application.rb',
15
- migration_version: migration_version
16
- )
17
- end
18
-
19
- def self.next_migration_number(dirname)
20
- ::ActiveRecord::Generators::Base.next_migration_number(dirname)
21
- end
22
-
23
- private
24
-
25
- def migration_version
26
- if ::ActiveRecord::VERSION::MAJOR >= 5
27
- "[#{::ActiveRecord::VERSION::MAJOR}.#{::ActiveRecord::VERSION::MINOR}]"
28
- end
29
- end
30
- end
31
- end
@@ -1,11 +0,0 @@
1
- class AddConfidentialToDoorkeeperApplication < ActiveRecord::Migration<%= migration_version %>
2
- def change
3
- add_column(
4
- :oauth_applications,
5
- :confidential,
6
- :boolean,
7
- null: false,
8
- default: true # maintaining backwards compatibility: require secrets
9
- )
10
- end
11
- end
@@ -1,10 +0,0 @@
1
- require "spec_helper_integration"
2
-
3
- describe Doorkeeper::ApplicationMetalController do
4
- it "lazy run hooks" do
5
- i = 0
6
- ActiveSupport.on_load(:doorkeeper_metal_controller) { i += 1 }
7
-
8
- expect(i).to eq 1
9
- end
10
- end