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
path: root/config
diff options
context:
space:
mode:
authorAlex Buijs <abuijs@gitlab.com>2019-08-09 18:40:54 +0300
committerAlex Buijs <abuijs@gitlab.com>2019-08-10 13:24:53 +0300
commita8da0de528f3a522c6d77b92ca5621c63ae9a69a (patch)
tree0d2d2327ddab83dc97bd84bd3a538d2dfa39acfa /config
parent456c0691cd1a7f73d8e2e5bcf3d47372c8db27be (diff)
Add invisible captcha
With a time treshold of 4 seconds and a firstname and lastname honeypot input fields when signing up
Diffstat (limited to 'config')
-rw-r--r--config/initializers/invisible_captcha.rb7
-rw-r--r--config/locales/invisible_captcha.en.yml4
2 files changed, 11 insertions, 0 deletions
diff --git a/config/initializers/invisible_captcha.rb b/config/initializers/invisible_captcha.rb
new file mode 100644
index 00000000000..5177c730596
--- /dev/null
+++ b/config/initializers/invisible_captcha.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+InvisibleCaptcha.setup do |config|
+ config.honeypots = %w(firstname lastname)
+ config.timestamp_enabled = true
+ config.timestamp_threshold = 4
+end
diff --git a/config/locales/invisible_captcha.en.yml b/config/locales/invisible_captcha.en.yml
new file mode 100644
index 00000000000..5978549c0c3
--- /dev/null
+++ b/config/locales/invisible_captcha.en.yml
@@ -0,0 +1,4 @@
+en:
+ invisible_captcha:
+ sentence_for_humans: If you are human, please ignore this field.
+ timestamp_error_message: That was a bit too quick! Please resubmit.