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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +6 -0
- data/app/views/doorkeeper/authorizations/form_post.html.erb +10 -6
- data/app/views/doorkeeper/authorizations/new.html.erb +2 -0
- data/lib/doorkeeper/config.rb +1 -1
- data/lib/doorkeeper/models/concerns/expirable.rb +1 -1
- data/lib/doorkeeper/oauth/code_request.rb +1 -1
- data/lib/doorkeeper/oauth/helpers/uri_checker.rb +0 -18
- data/lib/doorkeeper/version.rb +1 -1
- data/lib/generators/doorkeeper/templates/initializer.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b8f700b4b7e5e40df07c8679ec477db21fe96ed05d70a5e6cb50c62cac886c2
|
4
|
+
data.tar.gz: cc34f22bd2800620f9b901a0025f569a0299a1105a7350ba95b62b34b7f5cdad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
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 %>
|
data/lib/doorkeeper/config.rb
CHANGED
@@ -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-
|
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,
|
@@ -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
|
data/lib/doorkeeper/version.rb
CHANGED
@@ -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-
|
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.
|
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-
|
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.
|
340
|
+
version: '2.5'
|
341
341
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
342
342
|
requirements:
|
343
343
|
- - ">="
|