ambethia / recaptcha

ReCaptcha helpers for ruby apps
http://github.com/ambethia/recaptcha
MIT License
1.96k stars 439 forks source link

Fix minimum_score for enterprise API #420

Closed basabin54 closed 1 year ago

basabin54 commented 1 year ago

Setting the minimum_score attribute to anything would cause the v3 check to fail automatically when using reCAPTCHA Enterprise because the score accessor was incorrect and would return nil every time. I simply corrected the accessor for the score attribute coming back from the API and it works again.

Pre-Merge Checklist

grosser commented 1 year ago

tests check for the old code ... please check the original code that added it for clues to why alternatively we could do score or fallback to this new code if you think that would work

basabin54 commented 1 year ago

Sorry about that. I think it makes sense to fall back to the old accessor just in case. I've made that update

grosser commented 1 year ago

v5.12.2