Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Buijs <abuijs@gitlab.com>2019-08-14 15:05:24 +0300
committerAlex Buijs <abuijs@gitlab.com>2019-08-14 15:05:24 +0300
commitcdbe66490fe9d4d664562ee21e4b1be28298b411 (patch)
tree9387e19df35bcb8f15f3ecc33c31f511c66f3e0f /app/controllers/registrations_controller.rb
parenta8da0de528f3a522c6d77b92ca5621c63ae9a69a (diff)
Add logging and counter for invisible captcha
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r--app/controllers/registrations_controller.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 33e7ca061d3..db10515c0b4 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -4,9 +4,9 @@ class RegistrationsController < Devise::RegistrationsController
include Recaptcha::Verify
include AcceptsPendingInvitations
include RecaptchaExperimentHelper
+ include InvisibleCaptcha
prepend_before_action :check_captcha, only: :create
- invisible_captcha only: :create, on_timestamp_spam: :on_timestamp_spam_callback
before_action :whitelist_query_limiting, only: [:destroy]
before_action :ensure_terms_accepted,
if: -> { action_name == 'create' && Gitlab::CurrentSettings.current_application_settings.enforce_terms? }
@@ -135,10 +135,4 @@ class RegistrationsController < Devise::RegistrationsController
def terms_accepted?
Gitlab::Utils.to_boolean(params[:terms_opt_in])
end
-
- def on_timestamp_spam_callback
- return unless Feature.enabled?(:invisible_captcha)
-
- redirect_to new_user_session_path, alert: InvisibleCaptcha.timestamp_error_message
- end
end