doorkeeper 5.9.2 → 5.9.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5511de8196966ae7db845cac15ebcef1be9f3b2ad6861b677cdc9ca80783c775
4
- data.tar.gz: a939acb1f8734a1d6f2dedd58c5f006fb8db1726c6f87f0c4a14eec8f37ae7e8
3
+ metadata.gz: 71a32b8766b44f5eff16fbc128cfff6ab676b5af9104d16d58f060a0ed6d894c
4
+ data.tar.gz: 864e07764f1ba86d6f52a10e5a081291c2748dcecbfb8bcc60b0f27baa4e616e
5
5
  SHA512:
6
- metadata.gz: aaee9b32df715f74aa621e256c284a7a968f78ee11183d9b5e43695c0c59bbb1de0559ce8b4e232d5d4b9e4c404b8a926fa4a9f4c7e3c52da3c0f9f19cd6b169
7
- data.tar.gz: 92a836decf7418aa5bedb7793d9c924486b35485e9c0706e96064a7c984fcd90c204eef8c8260de30b89e501f1a71bb4372b01c8050cb96b638c5d68bd4c512a
6
+ metadata.gz: 4116cfa7e4e06a1bff79489ddeced66af1803dedd6f2e1b1b5edd67db0d90e444922a87cfc2215a4e61357e54ddf988606c3ecce40e50afb24fdd5e06808a2bd
7
+ data.tar.gz: 558ec2ac88215ba2cde034380a27d44d0c989841942c070e4ea02a746d154944b094ae2aa6a9284c7cca6d310705634fde4f6566fbf8a268a0c1b33e41937107
data/CHANGELOG.md CHANGED
@@ -9,6 +9,11 @@ User-visible changes worth mentioning.
9
9
 
10
10
  - Please add here
11
11
 
12
+ ## 5.9.3
13
+
14
+ - [#1834] Fix default `allow_token_introspection` returning `false` when a custom `application_class` is configured. The default proc compared application objects with `==`, which fails when the authorized client and the introspected token's application are resolved as different classes (e.g. a base `Doorkeeper::Application` vs. a configured subclass) even though they reference the same record. It now compares application ids instead.
15
+ - [#1832] Fix confusing `belongs_to :owner` side effect: `Doorkeeper::Models::Ownership` is now included only when `enable_application_owner?` is set (read at include time), so models no longer expose a misleading `owner` association/reflection when the application owner feature is disabled and the schema lacks the owner columns.
16
+
12
17
  ## 5.9.2
13
18
 
14
19
  - [#1822][#1823][#1825] Update Rubocop config, auto-corrections and codebase cleanup.
@@ -444,9 +444,9 @@ module Doorkeeper
444
444
  option :allow_token_introspection,
445
445
  default: (lambda do |token, authorized_client, authorized_token|
446
446
  if authorized_token
447
- authorized_token.application == token&.application
447
+ authorized_token.application_id == token&.application_id
448
448
  elsif token&.application
449
- authorized_client == token.application
449
+ authorized_client.id == token.application_id
450
450
  else
451
451
  true
452
452
  end
@@ -9,13 +9,12 @@ module Doorkeeper::Orm::ActiveRecord::Mixins
9
9
  self.strict_loading_by_default = false if respond_to?(:strict_loading_by_default)
10
10
 
11
11
  include ::Doorkeeper::ApplicationMixin
12
- # Included unconditionally: this block runs once at parent-class
13
- # autoload time, so gating on `enable_application_owner?` would
14
- # freeze behavior at first-load time. The actual owner validation
15
- # is still gated dynamically via `validate_owner?` →
16
- # `confirm_application_owner?`, and `belongs_to :owner` is lazy on
17
- # schemas that lack the columns.
18
- include ::Doorkeeper::Models::Ownership
12
+ # `enable_application_owner?` is read once, at parent-class autoload
13
+ # time (#1831): with the feature off the model exposes no `:owner`
14
+ # association avoiding a misleading reflection on schemas that lack
15
+ # the owner columns. The flag is therefore a load-time switch; turning
16
+ # it on later requires defining a fresh model class.
17
+ include ::Doorkeeper::Models::Ownership if Doorkeeper.config.enable_application_owner?
19
18
 
20
19
  has_many :access_grants,
21
20
  foreign_key: :application_id,
@@ -5,7 +5,7 @@ module Doorkeeper
5
5
  # Semantic versioning
6
6
  MAJOR = 5
7
7
  MINOR = 9
8
- TINY = 2
8
+ TINY = 3
9
9
  PRE = nil
10
10
 
11
11
  # Full version number
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.9.2
4
+ version: 5.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Elias Philipp