doorkeeper 5.5.1 → 5.5.2

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08f9f8fec2b33300cb7ed4a09ff5682330698f51515404339a1ef40621f1d0d0'
4
- data.tar.gz: 6d53afbc73dfdb731b0641575ffd7156ad3a74e11452654a99a1f24ad7f1093f
3
+ metadata.gz: 9b8f700b4b7e5e40df07c8679ec477db21fe96ed05d70a5e6cb50c62cac886c2
4
+ data.tar.gz: cc34f22bd2800620f9b901a0025f569a0299a1105a7350ba95b62b34b7f5cdad
5
5
  SHA512:
6
- metadata.gz: 345be4d8d397eacb61d21a749b0c8e1fe38a9f6f2868c14a76006a2cc0686c6e192b9828e7f37df39f83f80c69a4a8394191f9d28691db43616f47f52b2505bb
7
- data.tar.gz: 4c96d9ad3d31305f1fb9fc135de3ee5a4e187a38f317307da6d83fc8dabe265dab741c52f25d7f907930a195918b1713aa3db6495b37626a2cfe5fe621f9e240
6
+ metadata.gz: 27d0ae20071180742cb735351165d808d8d3a6f0571ce12fc741f572fb9f69c789d760c299fa5a31814790611474e3eed12fb2a8ab4902151c21a847855fa8d3
7
+ data.tar.gz: 64e39c64aa61cf27ee0418be14880b9bb1ce23159a6ee61af4d32b1a187ddcb32f70402799bb9f673a1d3a1efe1abd2e9b940564d05e161a7aee737497af1d54
data/CHANGELOG.md CHANGED
@@ -9,6 +9,13 @@ User-visible changes worth mentioning.
9
9
 
10
10
  - [#PR ID] Add your PR description here.
11
11
 
12
+ ## 5.5.2
13
+
14
+ - [#1502] Drop support for Ruby 2.4 because of EOL.
15
+ - [#1504] Updated the url fragment in the comment for code documentation.
16
+ - [#1512] Fix form behavior when response mode is form_post.
17
+ - [#1511] Fix that authorization code is returned by fragment if response_mode is fragament.
18
+
12
19
  ## 5.5.1
13
20
 
14
21
  - [#1496] Revoke `old_refresh_token` if `previous_refresh_token` is present.
data/README.md CHANGED
@@ -134,6 +134,12 @@ See [list of tutorials](https://github.com/doorkeeper-gem/doorkeeper/wiki#how-to
134
134
 
135
135
  Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/doorkeeper-gem#sponsor)]
136
136
 
137
+ <a href="https://codecademy.com/about/careers?utm_source=doorkeeper-gem" target="_blank"><img src="https://static-assets.codecademy.com/marketing/codecademy_logo_padded.png"/></a>
138
+
139
+ > Codecademy supports open source as part of its mission to democratize tech. Come help us build the education the world deserves: [https://codecademy.com/about/careers](https://codecademy.com/about/careers?utm_source=doorkeeper-gem)
140
+
141
+ <br>
142
+
137
143
  <a href="https://oauth.io/?utm_source=doorkeeper-gem" target="_blank"><img src="https://oauth.io/img/logo_text.png"/></a>
138
144
 
139
145
  > If you prefer not to deal with the gory details of OAuth 2, need dedicated customer support & consulting, try the cloud-based SaaS version: [https://oauth.io](https://oauth.io/?utm_source=doorkeeper-gem)
@@ -2,10 +2,14 @@
2
2
  <h1><%= t('.title') %></h1>
3
3
  </header>
4
4
 
5
- <main role="main" onload="document.forms[0].submit()">
6
- <%= form_tag @pre_auth.redirect_uri, method: :post do %>
7
- <% @authorize_response.body.each do |key, value| %>
8
- <%= hidden_field_tag key, value %>
9
- <% end %>
5
+ <%= form_tag @pre_auth.redirect_uri, method: :post, name: :redirect_form, authenticity_token: false do %>
6
+ <% @authorize_response.body.compact.each do |key, value| %>
7
+ <%= hidden_field_tag key, value %>
10
8
  <% end %>
11
- </main>
9
+ <% end %>
10
+
11
+ <script>
12
+ window.onload = function () {
13
+ document.forms['redirect_form'].submit();
14
+ };
15
+ </script>
@@ -25,6 +25,7 @@
25
25
  <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %>
26
26
  <%= hidden_field_tag :state, @pre_auth.state %>
27
27
  <%= hidden_field_tag :response_type, @pre_auth.response_type %>
28
+ <%= hidden_field_tag :response_mode, @pre_auth.response_mode %>
28
29
  <%= hidden_field_tag :scope, @pre_auth.scope %>
29
30
  <%= hidden_field_tag :code_challenge, @pre_auth.code_challenge %>
30
31
  <%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method %>
@@ -35,6 +36,7 @@
35
36
  <%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri %>
36
37
  <%= hidden_field_tag :state, @pre_auth.state %>
37
38
  <%= hidden_field_tag :response_type, @pre_auth.response_type %>
39
+ <%= hidden_field_tag :response_mode, @pre_auth.response_mode %>
38
40
  <%= hidden_field_tag :scope, @pre_auth.scope %>
39
41
  <%= hidden_field_tag :code_challenge, @pre_auth.code_challenge %>
40
42
  <%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method %>
@@ -374,7 +374,7 @@ module Doorkeeper
374
374
 
375
375
  # The controller Doorkeeper::ApplicationController inherits from.
376
376
  # Defaults to ActionController::Base.
377
- # https://doorkeeper.gitbook.io/guides/configuration/other-configurations#custom-base-controller
377
+ # https://doorkeeper.gitbook.io/guides/configuration/other-configurations#custom-controllers
378
378
  #
379
379
  # @param base_controller [String] the name of the base controller
380
380
  option :base_controller,
@@ -8,7 +8,7 @@ module Doorkeeper
8
8
  #
9
9
  # @return [Boolean] true if object expired and false in other case
10
10
  def expired?
11
- expires_in && Time.now.utc > expires_at
11
+ !!(expires_in && Time.now.utc > expires_at)
12
12
  end
13
13
 
14
14
  # Calculates expiration time in seconds.
@@ -13,7 +13,7 @@ module Doorkeeper
13
13
  def authorize
14
14
  auth = Authorization::Code.new(pre_auth, resource_owner)
15
15
  auth.issue_token!
16
- CodeResponse.new(pre_auth, auth)
16
+ CodeResponse.new(pre_auth, auth, response_on_fragment: pre_auth.response_mode == "fragment")
17
17
  end
18
18
 
19
19
  def deny
@@ -3,24 +3,6 @@
3
3
  require "ipaddr"
4
4
 
5
5
  module Doorkeeper
6
- module IPAddrLoopback
7
- def loopback?
8
- case @family
9
- when Socket::AF_INET
10
- @addr & 0xff000000 == 0x7f000000
11
- when Socket::AF_INET6
12
- @addr == 1
13
- else
14
- raise AddressFamilyError, "unsupported address family"
15
- end
16
- end
17
- end
18
-
19
- # For backward compatibility with old rubies
20
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0")
21
- IPAddr.include Doorkeeper::IPAddrLoopback
22
- end
23
-
24
6
  module OAuth
25
7
  module Helpers
26
8
  module URIChecker
@@ -5,7 +5,7 @@ module Doorkeeper
5
5
  # Semantic versioning
6
6
  MAJOR = 5
7
7
  MINOR = 5
8
- TINY = 1
8
+ TINY = 2
9
9
  PRE = nil
10
10
 
11
11
  # Full version number
@@ -120,7 +120,7 @@ Doorkeeper.configure do
120
120
  # The controller +Doorkeeper::ApplicationController+ inherits from.
121
121
  # Defaults to +ActionController::Base+ unless +api_only+ is set, which changes the default to
122
122
  # +ActionController::API+. The return value of this option must be a stringified class name.
123
- # See https://doorkeeper.gitbook.io/guides/configuration/other-configurations#custom-base-controller
123
+ # See https://doorkeeper.gitbook.io/guides/configuration/other-configurations#custom-controllers
124
124
  #
125
125
  # base_controller 'ApplicationController'
126
126
 
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: 5.5.1
4
+ version: 5.5.2
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: 2021-04-06 00:00:00.000000000 Z
14
+ date: 2021-06-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: railties
@@ -337,7 +337,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
337
337
  requirements:
338
338
  - - ">="
339
339
  - !ruby/object:Gem::Version
340
- version: '2.4'
340
+ version: '2.5'
341
341
  required_rubygems_version: !ruby/object:Gem::Requirement
342
342
  requirements:
343
343
  - - ">="