diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-01-20 14:24:20 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-20 14:24:20 -0500 |
commit | 1553c560e0d02e670b7cec2b443545e67418b569 (patch) | |
tree | 81c4fbabbd376d80db86a09d39f79ea35abee068 /app/controllers | |
parent | a8a65afe1e953ce3a9fc151f9e033b99fc568fad (diff) | |
parent | 8536e083f7b2d7ed77ecae83774d75f68d66e0b4 (diff) | |
download | gitlab-ce-1553c560e0d02e670b7cec2b443545e67418b569.tar.gz |
Merge branch 'feature/check-against-rbl-only' into 'master'
Split from !2455
References #9092
See merge request !2515
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/registrations_controller.rb | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 9943745208e..094eef28a43 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -74,6 +74,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :metrics_timeout, :metrics_method_call_threshold, :metrics_sample_interval, + :ip_blocking_enabled, + :dnsbl_servers_list, :recaptcha_enabled, :recaptcha_site_key, :recaptcha_private_key, diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index c48175a4c5a..5efdd613e79 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -8,6 +8,11 @@ class RegistrationsController < Devise::RegistrationsController def create if !Gitlab::Recaptcha.load_configurations! || verify_recaptcha + if Gitlab::IpCheck.new(request.remote_ip).spam? + flash[:alert] = 'Could not create an account. This IP is listed for spam.' + return render action: 'new' + end + super else flash[:alert] = "There was an error with the reCAPTCHA code below. Please re-enter the code." |