oauth2 2.0.26 → 2.1.0
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +22 -6
- data/README.md +1 -1
- data/lib/oauth2/client.rb +11 -0
- data/lib/oauth2/version.rb +1 -1
- data.tar.gz.sig +2 -2
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6c9c55fc9440e00e86933108643637ca90a94eee13cb15c681f410d32184338b
|
|
4
|
+
data.tar.gz: 83f047fee37e950e07b1818bf0e427c22d39dc5ec27a4e2d70e4df8ddbcab6af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 399c3d96bb47d79e0bcb57c2213226680721adf659280a87848f2424c2c8ed3a04865aeae2d73ec88a4fd768f0699b0e226d0530d0c652257a172e9a2c66b91b
|
|
7
|
+
data.tar.gz: 123aa2d9c1bc3e559d7c4068e157e1aa40e07e94f861786071b0ca0e17f732c07e7391f3e2fb2db63582fa75718897b36b8b64db95626d2e04976bff68853c1e
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -30,13 +30,17 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
30
30
|
|
|
31
31
|
### Security
|
|
32
32
|
|
|
33
|
-
## [2.0
|
|
33
|
+
## [2.1.0] - 2026-10-25
|
|
34
34
|
|
|
35
|
-
- TAG: [v2.0
|
|
36
|
-
- COVERAGE: 98.48% --
|
|
37
|
-
- BRANCH COVERAGE: 93.
|
|
35
|
+
- TAG: [v2.1.0][2.1.0t]
|
|
36
|
+
- COVERAGE: 98.48% -- 649/659 lines in 16 files
|
|
37
|
+
- BRANCH COVERAGE: 93.53% -- 217/232 branches in 16 files
|
|
38
38
|
- 90.83% documented
|
|
39
39
|
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- **BREAKING**: `allow_cross_origin_redirects` now defaults to `false`. Cross-origin redirects are blocked before credentials are replayed. Set `allow_cross_origin_redirects: true` explicitly to retain the previous behavior (deprecated).
|
|
43
|
+
|
|
40
44
|
### Security
|
|
41
45
|
|
|
42
46
|
- GHSA-cmh8-5q25-68v6 - OAUTH_DEBUG token-request secrets are redacted; see [gh!769][gh!769]. Reported by iamibi.
|
|
@@ -44,13 +48,23 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
44
48
|
- [gh!769][gh!769] - Redact secrets in structured token-request debug bodies, expand the default filtered credential keys, and require `auth-sanitizer` >= 0.2.5 by @makssein
|
|
45
49
|
- [gh!775][gh!775] - Strip Authorization headers, request bodies, and query parameters from cross-origin redirects by @Huge
|
|
46
50
|
- [gh!776][gh!776] - Redact configured sensitive response options from tokenless access-token initialization errors by @Huge
|
|
47
|
-
- GHSA-cmh8-5q25-68v6 - OAUTH_DEBUG token-request secrets are redacted; see [gh!769][gh!769]. Reported by iamibi.
|
|
48
51
|
|
|
49
52
|
[gh!769]: https://github.com/ruby-oauth/oauth2/pull/769
|
|
50
53
|
[gh!770]: https://github.com/ruby-oauth/oauth2/pull/770
|
|
51
54
|
[gh!775]: https://github.com/ruby-oauth/oauth2/pull/775
|
|
52
55
|
[gh!776]: https://github.com/ruby-oauth/oauth2/pull/776
|
|
53
56
|
|
|
57
|
+
## [2.0.26] - 2026-10-25
|
|
58
|
+
|
|
59
|
+
- TAG: [v2.0.26][2.0.26t]
|
|
60
|
+
- COVERAGE: 98.48% -- 647/657 lines in 16 files
|
|
61
|
+
- BRANCH COVERAGE: 93.48% -- 215/230 branches in 16 files
|
|
62
|
+
- 90.83% documented
|
|
63
|
+
|
|
64
|
+
### Security
|
|
65
|
+
|
|
66
|
+
- GHSA-cmh8-5q25-68v6 - OAUTH_DEBUG token-request secrets are redacted; see [gh!769][gh!769]. Reported by iamibi.
|
|
67
|
+
|
|
54
68
|
### Deprecated
|
|
55
69
|
|
|
56
70
|
- `allow_cross_origin_redirects: true` is deprecated. The default will change to `false` in the next minor release (2.1.0). Set it explicitly to retain the current behavior.
|
|
@@ -1048,7 +1062,9 @@ Please file a bug if you notice a violation of semantic versioning.
|
|
|
1048
1062
|
|
|
1049
1063
|
[gemfiles/readme]: gemfiles/README.md
|
|
1050
1064
|
|
|
1051
|
-
[Unreleased]: https://github.com/ruby-oauth/oauth2/compare/v2.0
|
|
1065
|
+
[Unreleased]: https://github.com/ruby-oauth/oauth2/compare/v2.1.0...HEAD
|
|
1066
|
+
[2.1.0]: https://github.com/ruby-oauth/oauth2/compare/v2.0.26...v2.1.0
|
|
1067
|
+
[2.1.0t]: https://github.com/ruby-oauth/oauth2/releases/tag/v2.1.0
|
|
1052
1068
|
[2.0.26]: https://github.com/ruby-oauth/oauth2/compare/v2.0.25...v2.0.26
|
|
1053
1069
|
[2.0.26t]: https://github.com/ruby-oauth/oauth2/releases/tag/v2.0.26
|
|
1054
1070
|
[2.0.25]: https://github.com/ruby-oauth/oauth2/compare/v2.0.24...v2.0.25
|
data/README.md
CHANGED
|
@@ -1084,7 +1084,7 @@ Thanks for RTFM. ☺️
|
|
|
1084
1084
|
[📌gitmoji]: https://gitmoji.dev
|
|
1085
1085
|
[📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
|
|
1086
1086
|
[🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
|
|
1087
|
-
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.
|
|
1087
|
+
[🧮kloc-img]: https://img.shields.io/badge/KLOC-0.659-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
|
|
1088
1088
|
[🔐security]: https://github.com/ruby-oauth/oauth2/blob/main/SECURITY.md
|
|
1089
1089
|
[🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
|
|
1090
1090
|
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
data/lib/oauth2/client.rb
CHANGED
|
@@ -66,6 +66,9 @@ module OAuth2
|
|
|
66
66
|
raise_errors: true,
|
|
67
67
|
logger: ::Logger.new($stdout),
|
|
68
68
|
access_token_class: AccessToken,
|
|
69
|
+
# Default changed from true to false in 2.1.0 for security.
|
|
70
|
+
# Cross-origin redirects are now rejected before credentials are replayed.
|
|
71
|
+
allow_cross_origin_redirects: false,
|
|
69
72
|
}.merge(opts)
|
|
70
73
|
@options[:connection_opts][:ssl] = ssl if ssl
|
|
71
74
|
end
|
|
@@ -491,6 +494,14 @@ module OAuth2
|
|
|
491
494
|
def sanitize_redirect_options(req_opts, current_location, next_location)
|
|
492
495
|
return req_opts unless cross_origin_redirect?(current_location, next_location)
|
|
493
496
|
|
|
497
|
+
unless options[:allow_cross_origin_redirects]
|
|
498
|
+
raise OAuth2::Error.new(
|
|
499
|
+
"error" => "cross_origin_redirect_blocked",
|
|
500
|
+
"error_description" => "Cross-origin redirect blocked: #{current_location.scheme}://#{current_location.host} -> #{next_location.scheme}://#{next_location.host}. " \
|
|
501
|
+
"Set allow_cross_origin_redirects: true to allow (deprecated)."
|
|
502
|
+
)
|
|
503
|
+
end
|
|
504
|
+
|
|
494
505
|
safe_opts = req_opts.dup
|
|
495
506
|
|
|
496
507
|
[:headers, "headers"].each do |key|
|
data/lib/oauth2/version.rb
CHANGED
|
@@ -4,7 +4,7 @@ module OAuth2
|
|
|
4
4
|
# Version namespace for this gem.
|
|
5
5
|
module Version
|
|
6
6
|
# Current gem version.
|
|
7
|
-
VERSION = "2.0
|
|
7
|
+
VERSION = "2.1.0"
|
|
8
8
|
end
|
|
9
9
|
# Current gem version exposed at the traditional constant location.
|
|
10
10
|
VERSION = Version::VERSION # Traditional Constant Location
|
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
�^�=�Z��ȩ�X�+W���]�
|
|
2
|
+
x��a"<$
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oauth2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Erik Michaels-Ober
|
|
@@ -593,10 +593,10 @@ licenses:
|
|
|
593
593
|
- MIT
|
|
594
594
|
metadata:
|
|
595
595
|
homepage_uri: https://oauth2.galtzo.com
|
|
596
|
-
source_code_uri: https://github.com/ruby-oauth/oauth2/tree/v2.0
|
|
597
|
-
changelog_uri: https://github.com/ruby-oauth/oauth2/blob/v2.0
|
|
596
|
+
source_code_uri: https://github.com/ruby-oauth/oauth2/tree/v2.1.0
|
|
597
|
+
changelog_uri: https://github.com/ruby-oauth/oauth2/blob/v2.1.0/CHANGELOG.md
|
|
598
598
|
bug_tracker_uri: https://github.com/ruby-oauth/oauth2/issues
|
|
599
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.0
|
|
599
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth2/2.1.0
|
|
600
600
|
funding_uri: https://github.com/sponsors/pboling
|
|
601
601
|
wiki_uri: https://github.com/ruby-oauth/oauth2/wiki
|
|
602
602
|
news_uri: https://www.railsbling.com/tags/oauth2
|
metadata.gz.sig
CHANGED
|
Binary file
|