devise 5.0.3 → 5.0.4

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: 40065ae1fdb8a0bdf390bf5c3624b9f68a89ac6dbb21131749d8833325248215
4
- data.tar.gz: 432727f7b82b0725c6cfb9fd7776b3ea0fc8d892abd3b44afe3c3753cac3dc6c
3
+ metadata.gz: c67cfd3438b138fe40dfed1f4898b40b9b1469dbd2d7b4858496110bd3d6a970
4
+ data.tar.gz: f5e280e647b29a59a52bb6064d30601b053b97f84a1bd2418e998e0454edb57c
5
5
  SHA512:
6
- metadata.gz: d52c4ee3175dd5c570b396b8391a6c673d33d9d073853142ddbe92399dde2cb94aca45778998fe8f959c503134994d459a00325c0fb0d53e7471e3f0093f37e2
7
- data.tar.gz: 49b47ef522f849a98e8a181aea7b3fb84796ec2094d015c30ac0593846570d8accb319d1e4f9e5a1c1c4139f88bf005e8435668e21e105cd6d0c6f0f6ca5af2f
6
+ metadata.gz: 245df1de08dc984a0caf07700690aa0a2325592b1873bd0ee4ffb539c9b1725b592907b2e3174ad7c48c9c03b40d2c741c52866338949474ee77156ae5a6862c
7
+ data.tar.gz: 54f318f2e72de3d5744e07fd74a17eaa8605034ebbd0e7c66e42dcac7813d901804a02be6bfe758c22ef2f804aba9d3807de69affa9d6706ee857450940d57af
data/CHANGELOG.md CHANGED
@@ -1,7 +1,12 @@
1
+ ### 5.0.4 - 2026-05-08
2
+
3
+ * security fixes
4
+ * Fix open redirect in `FailureApp` via unvalidated `Referer` header on non-GET session timeout. CVE-2026-40295 [GHSA-jp94-3292-c3xv](https://github.com/heartcombo/devise/security/advisories/GHSA-jp94-3292-c3xv)
5
+
1
6
  ### 5.0.3 - 2026-03-16
2
7
 
3
8
  * security fixes
4
- * Fix race condition vulnerability on confirmable "change email" which would allow confirming an email they don't own CVE-2026-32700 [#5783](https://github.com/heartcombo/devise/pull/5783) [#5784](https://github.com/heartcombo/devise/pull/5784)
9
+ * Fix race condition vulnerability on confirmable "change email" which would allow confirming an email they don't own CVE-2026-32700 [GHSA-57hq-95w6-v4fc](https://github.com/heartcombo/devise/security/advisories/GHSA-57hq-95w6-v4fc) [#5783](https://github.com/heartcombo/devise/pull/5783) [#5784](https://github.com/heartcombo/devise/pull/5784)
5
10
 
6
11
  ### 5.0.2 - 2026-02-18
7
12
 
data/README.md CHANGED
@@ -79,7 +79,7 @@ If you have discovered a security related bug, please do *NOT* use the GitHub is
79
79
 
80
80
  If you have any questions, comments, or concerns, please use StackOverflow instead of the GitHub issue tracker:
81
81
 
82
- http://stackoverflow.com/questions/tagged/devise
82
+ https://stackoverflow.com/questions/tagged/devise
83
83
 
84
84
  The deprecated mailing lists can still be read on:
85
85
 
@@ -90,7 +90,7 @@ https://groups.google.com/group/heartcombo
90
90
 
91
91
  You can view the Devise documentation in RDoc format here:
92
92
 
93
- http://rubydoc.info/github/heartcombo/devise/main/frames
93
+ https://rubydoc.info/github/heartcombo/devise/main/frames
94
94
 
95
95
  If you need to use Devise with previous versions of Rails, you can always run "gem server" from the command line after you install the gem to access the old documentation.
96
96
 
@@ -745,7 +745,7 @@ config.http_authenticatable = [:database]
745
745
  ```
746
746
 
747
747
  This restriction does not limit you from implementing custom warden strategies, either in your application or via gem-based extensions for devise.
748
- A common authentication strategy for APIs is token-based authentication. For more information on extending devise to support this type of authentication and others, see the wiki article for [Simple Token Authentication Examples and alternatives](https://github.com/heartcombo/devise/wiki/How-To:-Simple-Token-Authentication-Example#alternatives) or this blog post on [Custom authentication methods with Devise](http://blog.plataformatec.com.br/2019/01/custom-authentication-methods-with-devise/).
748
+ A common authentication strategy for APIs is token-based authentication. For more information on extending devise to support this type of authentication and others, see the wiki article for [Simple Token Authentication Examples and alternatives](https://github.com/heartcombo/devise/wiki/How-To:-Simple-Token-Authentication-Example#alternatives) or this blog post on [Custom authentication methods with Devise](https://blog.plataformatec.com.br/2019/01/custom-authentication-methods-with-devise/).
749
749
 
750
750
  #### Testing
751
751
  API Mode changes the order of the middleware stack, and this can cause problems for `Devise::Test::IntegrationHelpers`. This problem usually surfaces as an ```undefined method `[]=' for nil:NilClass``` error when using integration test helpers, such as `#sign_in`. The solution is simply to reorder the middlewares by adding the following to test.rb:
@@ -56,7 +56,7 @@ module Devise
56
56
  def extract_path_from_location(location)
57
57
  uri = parse_uri(location)
58
58
 
59
- if uri
59
+ if uri && uri.path
60
60
  path = remove_domain_from_uri(uri)
61
61
  path = add_fragment_back_to_path(uri, path)
62
62
 
@@ -139,7 +139,7 @@ module Devise
139
139
  path = if request.get?
140
140
  attempted_path
141
141
  else
142
- request.referrer
142
+ extract_path_from_location(request.referrer)
143
143
  end
144
144
 
145
145
  path || scope_url
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Devise
4
- VERSION = "5.0.3".freeze
4
+ VERSION = "5.0.4".freeze
5
5
  end
@@ -25,11 +25,7 @@ CONTENT
25
25
  end
26
26
 
27
27
  def migration_path
28
- if Rails.version >= '5.0.3'
29
- db_migrate_path
30
- else
31
- @migration_path ||= File.join("db", "migrate")
32
- end
28
+ db_migrate_path
33
29
  end
34
30
 
35
31
  def model_path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Valim
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubygems_version: 4.0.6
224
+ rubygems_version: 4.0.8
225
225
  specification_version: 4
226
226
  summary: Flexible authentication solution for Rails with Warden
227
227
  test_files: []