-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge changes into official CoinGecko repo #1
Conversation
skip verify_nonce
@@ -105,7 +119,7 @@ def verify_claims!(id_token) | |||
verify_aud!(id_token) | |||
verify_iat!(id_token) | |||
verify_exp!(id_token) | |||
verify_nonce!(id_token) if id_token[:nonce_supported] | |||
# verify_nonce!(id_token) if id_token[:nonce_supported] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to figure out why this is done. We really shouldn't be disabling the nonce verification, as it would allow for replay attacks.
@@ -63,6 +63,20 @@ def callback_url | |||
options[:redirect_uri] || (full_host + callback_path) | |||
end | |||
|
|||
def callback_phase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this callback_phase
? What does it actually do? 🤔
@@ -63,6 +63,20 @@ def callback_url | |||
options[:redirect_uri] || (full_host + callback_path) | |||
end | |||
|
|||
def callback_phase | |||
if request.request_method.downcase.to_sym == :post |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url += "&state=#{CGI::escape(state)}" | ||
url += "&user=#{CGI::escape(request.params['user'])}" if request.params['user'] | ||
end | ||
session.options[:drop] = true # Do not set a session cookie on this response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
url = "#{callback_url}" | ||
if (code = request.params['code']) && (state = request.params['state']) | ||
url += "?code=#{CGI::escape(code)}" | ||
url += "&state=#{CGI::escape(state)}" | ||
url += "&user=#{CGI::escape(request.params['user'])}" if request.params['user'] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we attaching these params on the query params of the callback URI? 🤔
We'll need answers to the above questions, but completing the migration first. |
No description provided.