You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2023. It is now read-only.
Hi @tobiashm,
Just to be extra secure, doesn't it make sense to check signatures first so that no third party could interfere?
Something like:
--- a/lib/openid/consumer/idres.rb
+++ b/lib/openid/consumer/idres.rb
@@ -70,9 +70,9 @@
# 'endpoint', 'message', and 'signed_fields' contain the
# verified information.
def id_res
+ check_signature
check_for_fields
verify_return_to
- check_signature
check_nonce
verify_discovery_results
end
My take is that this method will raise ProtocolError in the very first place (which is a good thing!) unless the request is a valid id_res response. Once it has been verified, the methods endpoint, message, and signed_fields contain the verified information.
Thereby making everything secure from any third party interference.
I'll be happy to raise a PR if this makes sense to you?