diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-20 13:16:34 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-20 15:28:19 +0100 |
commit | 8536e083f7b2d7ed77ecae83774d75f68d66e0b4 (patch) | |
tree | 116af03385a36c4a3b9e985d4f6cd7a690b6443a /app/controllers/registrations_controller.rb | |
parent | 481644ca7c9f763d4646ad557cc3bcf8f4f71816 (diff) | |
download | gitlab-ce-8536e083f7b2d7ed77ecae83774d75f68d66e0b4.tar.gz |
Add IP blocking against DNSBL at sign-upfeature/check-against-rbl-only
Diffstat (limited to 'app/controllers/registrations_controller.rb')
-rw-r--r-- | app/controllers/registrations_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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." |