Skip to content
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

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

ervinchai
Copy link
Collaborator

No description provided.

@@ -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]
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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
Copy link
Collaborator Author

@ervinchai ervinchai Jul 30, 2024

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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Comment on lines +68 to +73
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
Copy link
Collaborator Author

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? 🤔

@ervinchai
Copy link
Collaborator Author

We'll need answers to the above questions, but completing the migration first.

@ervinchai ervinchai merged commit 88b1cc1 into coingecko:master Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants