sso: Add missing captcha/rate limiting on SSO login

Tests:

- Install tt-rss. Logout. Visit the /tt-rss link. We will be redirected to the
login page. Login with wrong password 3 times. CAPTCHA is shown. Login with
correct password. Login will be successful.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2022-01-11 20:29:26 -08:00 committed by James Valleroy
parent e89b0ee276
commit 08eb54ad0f
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -3,6 +3,7 @@
URLs for the Single Sign On module.
"""
from axes.decorators import axes_dispatch
from django.urls import re_path
from stronghold.decorators import public
@ -11,8 +12,8 @@ from plinth.utils import non_admin_view
from .views import SSOLoginView, refresh
urlpatterns = [
re_path(r'^accounts/sso/login/$', public(SSOLoginView.as_view()),
name='sso-login'),
re_path(r'^accounts/sso/login/$',
public(axes_dispatch(SSOLoginView.as_view())), name='sso-login'),
re_path(r'^accounts/sso/refresh/$', non_admin_view(refresh),
name='sso-refresh'),
]