mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
sso: Fix conflict between urls of sso and captcha
django-simple-captcha's /refresh url's regex was matching anything that ends with the word "refresh". This was clashing with sso/refresh. Changed the regex for captcha's url to captcha/refresh. Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
111f8f9145
commit
5aabac036c
@ -3,7 +3,7 @@
|
||||
TKTAuthLoginURL /plinth/accounts/sso/login/
|
||||
TKTAuthBackArgName next
|
||||
TKTAuthDigest SHA512
|
||||
TKTAuthRefreshURL /plinth/accounts/sso/refresh-pubtkt/
|
||||
TKTAuthRefreshURL /plinth/accounts/sso/refresh/
|
||||
TKTAuthUnauthURL /plinth
|
||||
AuthType mod_auth_pubtkt
|
||||
AuthName "FreedomBox Single Sign On"
|
||||
|
||||
@ -26,9 +26,7 @@ from plinth.utils import non_admin_view
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^accounts/sso/login/$',
|
||||
public(SSOLoginView.as_view()),
|
||||
name='sso-login'),
|
||||
url(r'^accounts/sso/refresh-pubtkt/$',
|
||||
non_admin_view(refresh),
|
||||
public(SSOLoginView.as_view()), name='sso-login'),
|
||||
url(r'^accounts/sso/refresh/$', non_admin_view(refresh),
|
||||
name='sso-refresh'),
|
||||
]
|
||||
|
||||
@ -33,16 +33,17 @@ urlpatterns = [
|
||||
url(r'^sys/$', views.system_index, name='system'),
|
||||
|
||||
# captcha urls are public
|
||||
url(r'image/(?P<key>\w+)/$',
|
||||
public(cviews.captcha_image), name='captcha-image', kwargs={
|
||||
'scale': 1
|
||||
}),
|
||||
url(r'image/(?P<key>\w+)@2/$',
|
||||
public(cviews.captcha_image), name='captcha-image-2x', kwargs={
|
||||
'scale': 2
|
||||
}),
|
||||
url(r'audio/(?P<key>\w+)/$',
|
||||
url(r'^captcha/image/(?P<key>\w+)/$',
|
||||
public(cviews.captcha_image), name='captcha-image',
|
||||
kwargs={'scale': 1}),
|
||||
url(r'^captcha/image/(?P<key>\w+)@2/$',
|
||||
public(cviews.captcha_image), name='captcha-image-2x',
|
||||
kwargs={'scale': 2}),
|
||||
url(r'^captcha/audio/(?P<key>\w+)/$',
|
||||
public(cviews.captcha_audio), name='captcha-audio'),
|
||||
url(r'refresh/$', public(cviews.captcha_refresh), name='captcha-refresh'),
|
||||
url(r'^captcha/refresh/$',
|
||||
public(cviews.captcha_refresh), name='captcha-refresh'),
|
||||
|
||||
# locked url from django-axes
|
||||
url(r'locked/$', public(CaptchaLoginView.as_view()), name='locked_out'),
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user