Merge branch 'pravi/gitlab-ce-update-recaptcha' into 'master'

Update recaptcha gem from 3.x to 4.11

See merge request gitlab-org/gitlab-ce!25921
This commit is contained in:
Rémy Coutable 2019-03-13 14:53:02 +00:00
commit 8a8cc91940
4 changed files with 10 additions and 5 deletions

View File

@ -46,7 +46,7 @@ gem 'rack-oauth2', '~> 1.9.3'
gem 'jwt', '~> 2.1.0'
# Spam and anti-bot protection
gem 'recaptcha', '~> 3.0', require: 'recaptcha/rails'
gem 'recaptcha', '~> 4.11', require: 'recaptcha/rails'
gem 'akismet', '~> 2.0'
# Two-factor authentication

View File

@ -679,7 +679,7 @@ GEM
optimist (>= 3.0.0)
rdoc (6.0.4)
re2 (1.1.1)
recaptcha (3.0.0)
recaptcha (4.13.1)
json
recursive-open-struct (1.1.0)
redis (3.3.5)
@ -1113,7 +1113,7 @@ DEPENDENCIES
rbtrace (~> 0.4)
rdoc (~> 6.0)
re2 (~> 1.1.1)
recaptcha (~> 3.0)
recaptcha (~> 4.11)
redis (~> 3.2)
redis-namespace (~> 1.6.0)
redis-rails (~> 5.0.2)

View File

@ -0,0 +1,5 @@
---
title: Apply recaptcha API change in 4.0
merge_request: 25921
author: Praveen Arimbrathodiyil
type: other

View File

@ -5,8 +5,8 @@ module Gitlab
def self.load_configurations!
if Gitlab::CurrentSettings.recaptcha_enabled
::Recaptcha.configure do |config|
config.public_key = Gitlab::CurrentSettings.recaptcha_site_key
config.private_key = Gitlab::CurrentSettings.recaptcha_private_key
config.site_key = Gitlab::CurrentSettings.recaptcha_site_key
config.secret_key = Gitlab::CurrentSettings.recaptcha_private_key
end
true