Skip to content

Commit 5dabcc8

Browse files
authored
adapt to Rails 7.0 defaults (#318)
* adapt to Rails 7.0 defaults Since 7.0, Rails protects against redirecting to external hosts https://api.rubyonrails.org/classes/ActionController/Redirecting.html#method-i-redirect_to-label-Open+Redirect+protection This change adapts to this by adding the option `allow_other_host` to the method call * fill in changelog
1 parent 4485701 commit 5dabcc8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22
## HEAD
33

4+
* Adapt to open request protection strategy of rails 7.0 [#318](https://github.com/Sorcery/sorcery/pull/318)
5+
46
## 0.16.3
57

68
* Fix provider instantiation for plural provider names (eg. okta) [#305](https://github.com/Sorcery/sorcery/pull/305)

lib/sorcery/controller/submodules/external.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def sorcery_fixup_callback_url(provider)
118118
# sends user to authenticate at the provider's website.
119119
# after authentication the user is redirected to the callback defined in the provider config
120120
def login_at(provider_name, args = {})
121-
redirect_to sorcery_login_url(provider_name, args)
121+
redirect_to sorcery_login_url(provider_name, args), allow_other_host: true
122122
end
123123

124124
# tries to login the user from provider's callback

0 commit comments

Comments
 (0)