OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/modules/recaptcha/config/initializers/recaptcha.rb

16 lines
594 B

Recaptcha.configure do |config|
# site_key and secret_key are defined via ENV already (RECAPTCHA_SITE_KEY, RECAPTCHA_SECRET_KEY)
config.verify_url = OpenProject::Recaptcha.verify_url_override || config.verify_url
config.api_server_url = OpenProject::Recaptcha.api_server_url_override || config.api_server_url
end
module RecaptchaLimitOverride
def invalid_response?(resp)
return super unless OpenProject::Recaptcha::use_hcaptcha?
resp.empty? || resp.length > ::OpenProject::Recaptcha.hcaptcha_response_limit
end
end
Recaptcha.singleton_class.prepend RecaptchaLimitOverride