realdoug / omniauth-salesforce

OmniAuth strategy for salesforce.com
MIT License
65 stars 90 forks source link

Fix timing attack vulnerability #41

Closed pragmaticsc closed 4 months ago

pragmaticsc commented 4 months ago

== should not be used for cryptographic comparison

When both sides are cryptographic hashes or secrets, the == operator will compare them character by character and stop at the first mismatch. This means the time it takes to return false is dependent on how many characters match from the beginning.