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 authored and James Valleroy committed 2022-01-16 10:15:28 -05:00
1 parent e89b0ee276
commit 08eb54ad0f
1 file changed
+3 -2
+3 -2
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'),
]