excelwebzone / EWZRecaptchaBundle

This bundle provides easy reCAPTCHA form field for Symfony.
MIT License
395 stars 160 forks source link

[Bug] Server-side hostname check accesses ReCaptcha\Response as an array #207

Closed dkarlovi closed 6 years ago

dkarlovi commented 6 years ago

In https://github.com/excelwebzone/EWZRecaptchaBundle/blob/68bbd5355f945506132a5874e57ce34049f93dd5/src/Validator/Constraints/IsTrueValidator.php#L137

the validator accesses $response['hostname'], but $response is instance of ReCaptcha\Response which does not allow array access.

It seems $response->getHostname() is correct here?