diff --git a/settings_local.py-template b/settings_local.py-template index 1b9da34..aed01ed 100644 --- a/settings_local.py-template +++ b/settings_local.py-template @@ -1,10 +1,8 @@ -AKISMET_KEY = '' CSRF_COOKIE_SECURE = False DEBUG = True INTERCOM_SECRET_KEY = '' POSTMARK_API_KEY = '' RAVEN_CONFIG = {'dsn': ''} -RECAPTCHA_SECRET = '' SECRET_KEY = 'changeme' SESSION_COOKIE_SECURE = False SSLIFY_DISABLE = False diff --git a/snipts/api.py b/snipts/api.py index eec942d..4ab7d87 100644 --- a/snipts/api.py +++ b/snipts/api.py @@ -155,23 +155,6 @@ class SniptValidation(Validation): if (len(bundle.data['title']) > 255): errors = 'Title must be 255 characters or less.' - akismet_url = 'https://{}.rest.akismet.com/1.1/comment-check'.format( - settings.AKISMET_KEY) - blog = 'https://snipt.net' - user_ip = bundle.request.META.get('REMOTE_ADDR') - comment_content = bundle.obj.code - - payload = { - 'blog': blog, - 'user_ip': user_ip, - 'comment_content': comment_content - } - r = requests.post(akismet_url, - data=payload) - - if r.text == 'true': - errors = 'This snipt looks like spam. If you believe that your snipt is not spam, please email support@snipt.net.' - return errors diff --git a/templates/base.html b/templates/base.html index 70e8433..9658be5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -65,8 +65,6 @@ - - diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html index 9d40b5d..e9d863d 100644 --- a/templates/registration/registration_form.html +++ b/templates/registration/registration_form.html @@ -73,7 +73,6 @@ {% endif %} -
Log in diff --git a/utils/views.py b/utils/views.py index 561e09a..c95cad6 100644 --- a/utils/views.py +++ b/utils/views.py @@ -1,7 +1,3 @@ -import requests - -from django.conf import settings -from django.http import HttpResponse from registration.backends.default.views import RegistrationView from utils.forms import SniptRegistrationForm @@ -13,19 +9,6 @@ class SniptRegistrationView(RegistrationView): form_class = SniptRegistrationForm def dispatch(self, request, *args, **kwargs): - - if request.method == 'POST': - payload = { - 'secret': settings.RECAPTCHA_SECRET, - 'response': request.POST['g-recaptcha-response'], - 'remoteip': request.META.get('REMOTE_ADDR') - } - r = requests.post('https://www.google.com/recaptcha/api/siteverify', - data=payload) - - if not r.json()['success']: - return HttpResponse('You failed the robot check. Go back and try again.') - return super(RegistrationView, self).dispatch(request, *args, **kwargs) def get_success_url(self, request, user):